Make swarm run more generic

This commit is contained in:
Patrick Jentsch 2019-08-05 14:22:16 +02:00
parent 602ef371f8
commit ab688e290a

View File

@ -20,7 +20,7 @@ class Swarm:
def run(self, job):
# Prepare argument values needed for the service creation.
_command = 'ocr' \
_command = job['service'] \
+ ' -i /files/{}'.format(job['id']) \
+ ' -l {}'.format(job['service_args']['lang']) \
+ ' -o /files/{}/output'.format(job['id']) \
@ -31,7 +31,7 @@ class Swarm:
job['service'],
job['service_args']['version']
)
_labels = {'service': 'ocr'}
_labels = {'service': job['service']}
_mounts = [
'/home/compute/mnt/opaque/jobs:/files:rw',
]