Save output in input folder.

This commit is contained in:
Patrick Jentsch 2019-08-01 08:21:47 +02:00
parent 9805a6be74
commit 009e188924

View File

@ -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