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 the Jupyter notebooks from. Amazon SageMaker provides many built-in images for you to use. If you need different functionality, you can bring your own custom images to Studio. For the list of built-in images, see Available Amazon SageMaker Images.

A SageMaker image is a holder for a set of SageMaker image versions. An image version represents a container image that is compatible with SageMaker Studio and stored in an Amazon Elastic Container Registry (ECR) repository. Each image version is immutable.

To make a custom SageMaker image available to all users within a domain, you attach the image to the domain. To make an image available to a single user, you attach the image to the user's profile. When you attach an image, SageMaker uses the latest image version by default. You can also attach a specific image version. After you attach the version, you can choose the version from the SageMaker Launcher or the image selector when you launch a notebook.

You can create images and image versions, and attach image versions to your domain, using the SageMaker Studio 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 Studio.

SageMaker provides sample Dockerfiles to use as a starting point for your custom SageMaker images in the SageMaker Studio Custom Image Samples repository. These include Dockerfiles for the following images:

  • Julia

  • R

  • Scala

  • Tensorflow 2

The following topics explain how to bring your own image using the SageMaker console and then launch the image in SageMaker Studio. A more comprehensive tutorial additionally shows you how to build a custom container image from a supplied R Dockerfile. 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.