mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Comment --keep_intermediates
This commit is contained in:
		@@ -23,9 +23,8 @@ class Swarm:
 | 
			
		||||
        _command = job['service'] \
 | 
			
		||||
                  + ' -i /files/{}'.format(job['id']) \
 | 
			
		||||
                  + ' -l {}'.format(job['service_args']['lang']) \
 | 
			
		||||
                  + ' -o /files/{}/output'.format(job['id']) \
 | 
			
		||||
                  + ' --keep-intermediates' \
 | 
			
		||||
                  + ' --nCores {}'.format(job['requested_cpus'])
 | 
			
		||||
                  + ' -o /files/{}/output'.format(job['id'])
 | 
			
		||||
                  # + ' --keep-intermediates'
 | 
			
		||||
        _constraints = ['node.role==worker']
 | 
			
		||||
        _image = 'gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/{}:{}'.format(
 | 
			
		||||
            job['service'],
 | 
			
		||||
@@ -63,6 +62,8 @@ class Swarm:
 | 
			
		||||
        '       (name=_name). Because there is no id generator for now, it is
 | 
			
		||||
        '       not set, so that the Docker engine assigns a random name.
 | 
			
		||||
        '''
 | 
			
		||||
        print(_command)
 | 
			
		||||
        print(_image)
 | 
			
		||||
        service = self.docker.services.create(
 | 
			
		||||
            _image,
 | 
			
		||||
            command=_command,
 | 
			
		||||
@@ -80,6 +81,7 @@ class Swarm:
 | 
			
		||||
        '       method) the poll loop also checks if the task list is empy (The
 | 
			
		||||
        '       not service.tasks() condition implements this).
 | 
			
		||||
        '''
 | 
			
		||||
        print(service.attrs)
 | 
			
		||||
        while not service.tasks() or \
 | 
			
		||||
                service.tasks()[0].get('Status').get('State') != 'complete':
 | 
			
		||||
            time.sleep(1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user