Deploy Base Image
Learn to deploy Docker images in Code Ocean.
Last updated
Learn to deploy Docker images in Code Ocean.
Last updated
You can deploy Docker images as starter environments for compute capsules. The starter environments are also called base images and will be available for users in their capsule's environment editor. The starter environments may include different machine languages, versions of languages and IDEs, software packages, etc., so users can start customizing their ideal compute environments efficiently.
You can deploy a recommended base image or switch tags to build a custom image.
Click on +Add New Base Image and the ‘New Base Image’ dialog will appear with the ‘Recommended’ view.
We currently provide three base images to deploy. You can select the images and click on the Deploy button to deploy the recommended base image.
Complete the fields and click Deploy to deploy the image (see an explanation about each field below).
The system keeps a list of images deployed in each VPC account. Clicking on it will show all the deployed image names.
The name of the image. Any name that reflects the language or purpose of the image is suitable.
The URL of the image to pull. Any public Docker image URL or any base image from the Code Ocean Docker registry starting with registry.codeocean.com
works. For private image URLs, contact support@codeocean.com
The version of the image so you can keep track of future updates. Different versions of images under the same name will be grouped together in the Environment Editor.
The programming language tag for this image. The language tag can be used for filtering in the Environment manager.
The description of this base image so end users can understand what the image is about.
Standard: with CPU only, GPU: with GPU.
Keywords relevant to the image such as language, version, etc., so it's easier to search the image.
Name + version combination must be unique
The docker image source of the new image must be unique
The default user in the container from the new image needs to be the root user for it to access the folder in Cloud Workstations and computations. Keep this in mind if pulling from a public Docker image. If you are creating the Docker file, please add this line: USER 0:0
to set the user inside the container to root.
Below are the examples of completed forms from the recommend base image:
This is an example of a Python image that runs on CPU-only instances:
To create a Starter Environment from the environment of a Capsule in your deployment, select From Capsule in the Add Starter Environment menu and complete the fields as shown below.
Any Capsule identifier from a private Capsule in your Code Ocean deployment i.e. not from the Open Science Library. This identifier can be found on the Capsule Metadata page.
The name of the image. Any name that reflects the language or purpose of the image is suitable.
The version of the image so you can keep track of future updates. Different versions of images under the same name will be grouped together in the Environment Editor.
The directory of the image in your Code Ocean deployment’s Docker Registry. By default, the Auto generate box will be checked to automatically fill this field based on the name and version you provided above.
The primary language used in the environment. This determines which sample files will be generated in the environment. Other languages can be mentioned via tags (below) to aid in searching for a specific Starter Environment.
The description of this base image so end users can understand what the image is about.
Standard: with CPU only, GPU: with GPU.
After you click Deploy, you can track the deployment status in the images list.