Skip to content

Commit

Permalink
Update distDocker to use entrypoint interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cg2v committed Aug 3, 2015
1 parent 4552ba4 commit bdb6a5e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions vmms/distDocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,13 @@ def runJob(self, vm, runTimeout, maxOutputFileSize):
instanceName = self.instanceName(vm.id, vm.image)
volumePath = self.getVolumePath(instanceName)

autodriverCmd = 'autodriver -u %d -f %d -t %d -o %d autolab &> output/feedback' % \
autodriverArgs = '-u %d -f %d -t %d -o %d' % \
(config.Config.VM_ULIMIT_USER_PROC,
config.Config.VM_ULIMIT_FILE_SIZE,
runTimeout, config.Config.MAX_OUTPUT_FILE_SIZE)

# IMPORTANT: The single and double quotes are important, since we
# are switching to the autolab user and then running
# bash commands.
setupCmd = 'cp -r mount/* autolab/; su autolab -c "%s"; \
cp output/feedback mount/feedback' % autodriverCmd

args = "(docker run --name %s -v %s:/home/mount %s sh -c '%s')" % \
(instanceName, volumePath, vm.image, setupCmd)
args = "(docker run --name %s -v %s:/home/mount %s %s)" % \
(instanceName, volumePath, vm.image, autodriverArgs)

self.log.debug('Running job: %s' % args)

Expand Down

0 comments on commit bdb6a5e

Please sign in to comment.