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

Make swarm run more generic

parent 602ef371
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ class Swarm: ...@@ -20,7 +20,7 @@ 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 = job['service'] \
+ ' -i /files/{}'.format(job['id']) \ + ' -i /files/{}'.format(job['id']) \
+ ' -l {}'.format(job['service_args']['lang']) \ + ' -l {}'.format(job['service_args']['lang']) \
+ ' -o /files/{}/output'.format(job['id']) \ + ' -o /files/{}/output'.format(job['id']) \
...@@ -31,7 +31,7 @@ class Swarm: ...@@ -31,7 +31,7 @@ class Swarm:
job['service'], job['service'],
job['service_args']['version'] job['service_args']['version']
) )
_labels = {'service': 'ocr'} _labels = {'service': job['service']}
_mounts = [ _mounts = [
'/home/compute/mnt/opaque/jobs:/files:rw', '/home/compute/mnt/opaque/jobs:/files:rw',
] ]
......
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