HTCondor Docker usage

Condor has the capability to pull docker images from docker hub: https://hub.docker.com/

To do this we must make a few small modifications to the submitfile as well as our general workflow. To start, here is an example of a submit file using the docker capabilities of condor:



Universe = docker
Executable = ./dockertest.sh
docker_image = uwclms/python3.6
Log = test.log
Output = test.out
Error = test.error
request_memory = 512
should_transfer_files = YES
when_to_transfer_output = ON_EXIT
Queue




There are four important lines here.

The first is that the "Universe" should be set to "docker"

Next we must point condor at the proper image, this should be the namespace of the docker image on docker hub. The "uwclms/python3.6" Image is a standard image built for our environment that has a list of default python packages installed that are commonly used.

The next two pieces "should_transfer_files = YES" and "when_to_transfer_output = ON_EXIT" are features that will help move our executable into the docker container, as well as pulling output out. Anything written to the "/scratch" directory during the job will be transfered back out into the submit directory upon job completion. IE if you submit a job from "/home/userA/job/" Anything you write to "/scratch" will end up in that directory once the job as completed.

In addition to the scratch directory however, we also mount the "/corpora" directory for input, as well as the "/projects" Directory for both input and output. This directories are mounted by HTCondor and NOT by docker. Any image you run via condor will have these directories available.

Topic revision: r2 - 2019-03-07 - 22:55:31 - linghelp
 

This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Privacy Statement Terms & Conditions