Skip to content
Snippets Groups Projects
Commit 009e1889 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Save output in input folder.

parent 9805a6be
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,9 @@ class Swarm: ...@@ -21,9 +21,9 @@ 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 = 'ocr' \
+ ' -i /input/{}'.format(job['id']) \ + ' -i /files/{}'.format(job['id']) \
+ ' -l {}'.format(job['service_args']['lang']) \ + ' -l {}'.format(job['service_args']['lang']) \
+ ' -o /output' \ + ' -o /files/{}/output'.format(job['id']) \
+ ' --keep-intermediates' \ + ' --keep-intermediates' \
+ ' --nCores {}'.format(job['requested_cpus']) + ' --nCores {}'.format(job['requested_cpus'])
_constraints = ['node.role==worker'] _constraints = ['node.role==worker']
...@@ -32,7 +32,9 @@ class Swarm: ...@@ -32,7 +32,9 @@ class Swarm:
job['service_args']['version'] job['service_args']['version']
) )
_labels = {'service': 'ocr'} _labels = {'service': 'ocr'}
_mounts = ['/home/compute/lovelace/opaque/files:/input:rw'] _mounts = [
'/home/compute/lovelace/opaque/files:/files:rw',
]
_name = job['id'] _name = job['id']
''' '''
' The Docker SDK for Python expects the cpu_reservation value to be ' The Docker SDK for Python expects the cpu_reservation value to be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment