diff --git a/app/swarm.py b/app/swarm.py index 2a42dd66..9214ab0a 100644 --- a/app/swarm.py +++ b/app/swarm.py @@ -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