Bring your own SageMaker image - Amazon SageMaker

Bring your own SageMaker image

A SageMaker image is a file that identifies the kernels, language packages, and other dependencies required to run a Jupyter notebook in Amazon SageMaker Studio. These images are used to create an environment that you then run Jupyter notebooks from. Amazon SageMaker provides many built-in images for you to use. For the list of built-in images, see Available Amazon SageMaker Images.

If you need different functionality, you can bring your own custom images to Studio. You can create images and image versions, and attach image versions to your domain or shared space, using the SageMaker control panel, the AWS SDK for Python (Boto3), and the AWS Command Line Interface (AWS CLI). You can also create images and image versions using the SageMaker console, even if you haven't onboarded to a SageMaker domain. SageMaker provides sample Dockerfiles to use as a starting point for your custom SageMaker images in the SageMaker Studio Custom Image Samples repository.

The following topics explain how to bring your own image using the SageMaker console or AWS CLI, then launch the image in Studio. For a similar blog article, see Bringing your own R environment to Amazon SageMaker Studio. For notebooks that show how to bring your own image for use in training and inference, see Amazon SageMaker Studio Container Build CLI.

Key terminology

The following section defines key terms for bringing your own image to use with Studio.

  • Dockerfile: A Dockerfile is a file that identifies the language packages and other dependencies for your Docker image.

  • Docker image: The Docker image is a built Dockerfile. This image is checked into Amazon ECR and serves as the basis of the SageMaker image.

  • SageMaker image: A SageMaker image is a holder for a set of SageMaker image versions based on Docker images. Each image version is immutable.

  • Image version: An image version of a SageMaker image represents a Docker image and is stored in an Amazon ECR repository. Each image version is immutable. These image versions can be attached to a domain or shared space and used with Studio.