mirror of
https://github.com/clearml/clearml-docs
synced 2025-01-31 06:27:22 +00:00
1.6 KiB
1.6 KiB
title |
---|
Building Docker Containers |
Exporting a Task into a Standalone Docker Container
Task Container
Build a Docker container that when launched executes a specific experiment, or a clone (copy) of that experiment.
-
Build a Docker container that at launch will execute a specific Task:
clearml-agent build --id <task-id> --docker --target <new-docker-name> --entry-point reuse_task
-
Build a Docker container that at launch will clone a Task specified by Task ID, and will execute the newly cloned Task:
clearml-agent build --id <task-id> --docker --target <new-docker-name> --entry-point clone_task
-
Run built Docker by executing:
docker run <new-docker-name>
Check out this tutorial for building executable experiment containers.
Base Docker Container
Build a Docker container according to the execution environment of a specific task.
clearml-agent build --id <task-id> --docker --target <new-docker-name>
You can add the Docker container as the base Docker image to a task (experiment), using one of the following methods:
- Using the ClearML Web UI - See Base Docker image on the "Tuning Experiments" page.
- In the ClearML configuration file - Use the ClearML configuration file
agent.default_docker
options.
Check out this tutorial for building a Docker container replicating the execution environment of an existing task.