mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Make swarm run more generic
This commit is contained in:
		@@ -20,7 +20,7 @@ class Swarm:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def run(self, job):
 | 
					    def run(self, job):
 | 
				
			||||||
        # Prepare argument values needed for the service creation.
 | 
					        # Prepare argument values needed for the service creation.
 | 
				
			||||||
        _command = 'ocr' \
 | 
					        _command = job['service'] \
 | 
				
			||||||
                  + ' -i /files/{}'.format(job['id']) \
 | 
					                  + ' -i /files/{}'.format(job['id']) \
 | 
				
			||||||
                  + ' -l {}'.format(job['service_args']['lang']) \
 | 
					                  + ' -l {}'.format(job['service_args']['lang']) \
 | 
				
			||||||
                  + ' -o /files/{}/output'.format(job['id']) \
 | 
					                  + ' -o /files/{}/output'.format(job['id']) \
 | 
				
			||||||
@@ -31,7 +31,7 @@ class Swarm:
 | 
				
			|||||||
            job['service'],
 | 
					            job['service'],
 | 
				
			||||||
            job['service_args']['version']
 | 
					            job['service_args']['version']
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        _labels = {'service': 'ocr'}
 | 
					        _labels = {'service': job['service']}
 | 
				
			||||||
        _mounts = [
 | 
					        _mounts = [
 | 
				
			||||||
            '/home/compute/mnt/opaque/jobs:/files:rw',
 | 
					            '/home/compute/mnt/opaque/jobs:/files:rw',
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user