-
Notifications
You must be signed in to change notification settings - Fork 28
Competition docker image
ObadaS edited this page Sep 4, 2024
·
3 revisions
The competition docker image defines the docker environment in which the submissions of the competitions or benchmarks are run. Each competition can have a different docker environment, referred by its DockerHub name and tag.
The default competition docker image is codalab/codalab-legacy:py37
.
More information here: https://github.com/codalab/codalab-dockers
You can select another docker image:
- In the
competition.yaml
file, usingdocker_image: username/image:tag
- In the editor field "Competition Docker image" as shown in the following screenshot:
If the default image does not suit your needs (missing libraries, etc.), you can either:
- Select an existing image from DockerHub
- Create your own image from scratch
- Create a custom image based on the Codalab image. (more information below)
If you wish to create a custom image based on the Codalab image, you can follow the steps below:
- Install Docker
- Sign up to DockerHub
docker run -itd -u root codalab/codalab-legacy:py37 /bin/bash
- Use
docker ps
to find running container id - Now run
docker exec -it -u root <CONTAINER ID> bash
- Install anything you want at the docker container shell (
apt-get install
,pip install
, etc.) - Exit the shell with
exit
docker commit <CONTAINER ID> username/image:tag
docker login
docker push username/image:tag