If you want to use an off-the-shelf public docker image, use one of the generic docker profiles. The most common are:
docker-batch: for batch computation that does not need a network connection.docker-network: for a task that requires an internet access.docker-network-ssh: for tasks that need to be accessed through ssh.docker-cluster: for tasks that run on a cluster of multiple nodes .To specify a docker image, simply fill in the following constants:
DOCKER_REPO: the repositoryDOCKER_TAG: the tag (latest by default)Then specify the command to run in the container with the constant DOCKER_CMD (ENTRYPOINT of the image will be honored but CMD of the image will be replaced by DOCKER_CMD).
You can run any docker images available on the Docker Hub. We’ll take the example of the Hello World docker image that we will run using the Python SDK - see Launching a computation with a SDK for more information:
import qarnot
conn = qarnot.connection.Connection(client_token='<<<MY_SECRET_TOKEN>>>')
task = conn.create_task('Hello World from Docker Hub', 'docker-batch')
task.constants['DOCKER_REPO'] = 'hello-world'
task.constants['DOCKER_TAG'] = 'latest'
task.run()
print(task.stdout())To start using docker images on Qarnot please read the following guides: