mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Save output in input folder.
This commit is contained in:
		@@ -21,9 +21,9 @@ class Swarm:
 | 
			
		||||
    def run(self, job):
 | 
			
		||||
        # Prepare argument values needed for the service creation.
 | 
			
		||||
        _command = 'ocr' \
 | 
			
		||||
                  + ' -i /input/{}'.format(job['id']) \
 | 
			
		||||
                  + ' -i /files/{}'.format(job['id']) \
 | 
			
		||||
                  + ' -l {}'.format(job['service_args']['lang']) \
 | 
			
		||||
                  + ' -o /output' \
 | 
			
		||||
                  + ' -o /files/{}/output'.format(job['id']) \
 | 
			
		||||
                  + ' --keep-intermediates' \
 | 
			
		||||
                  + ' --nCores {}'.format(job['requested_cpus'])
 | 
			
		||||
        _constraints = ['node.role==worker']
 | 
			
		||||
@@ -32,7 +32,9 @@ class Swarm:
 | 
			
		||||
            job['service_args']['version']
 | 
			
		||||
        )
 | 
			
		||||
        _labels = {'service': 'ocr'}
 | 
			
		||||
        _mounts = ['/home/compute/lovelace/opaque/files:/input:rw']
 | 
			
		||||
        _mounts = [
 | 
			
		||||
            '/home/compute/lovelace/opaque/files:/files:rw',
 | 
			
		||||
        ]
 | 
			
		||||
        _name = job['id']
 | 
			
		||||
        '''
 | 
			
		||||
        ' The Docker SDK for Python expects the cpu_reservation value to be
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user