Updated on 2026-06-09 GMT+08:00

Saving a Notebook Instance

To save a notebook environment image, do as follows: Create a notebook instance using a preset image, install custom software and dependencies on the base image, and save the running instance as a container image. After the image is saved, the default working directory is the / path in the root directory.

In the saved image, the installed dependencies are retained. The data stored in home/ma-user/work for persistent storage will not be stored. When you use VS Code for remote development, the plug-ins installed on the Server are retained.

The image saving function implements version iterations by stacking a new layer onto the original image. Due to the immutability of image layers, the size of the newly generated image will always exceed that of the original, regardless of whether addition or deletion is performed.

  • If the image fails to be saved, view the event on the notebook instance details page. For details, see Viewing Notebook Events.
  • The image to be saved should not be larger than 35 GB and there should be no more than 125 layers. Otherwise, the image may fail to be saved. For details, see Space Allocation for Container Engines.
    • If a dedicated resource pool is used, log in to the ModelArts console. On the dedicated resource pool scaling page, configure the container engine size as needed. For details, see Resizing a Dedicated Resource Pool.
    • If the fault persists, contact technical support.
  • When you use the containerd image saving function, pay attention to the following:
    • Do not download files and save images at the same in an instance to prevent performance deterioration caused by resource competition.
    • If there is a file larger than 10 GB in an instance system folder (for example, /opt/), you should not use the image saving function, in case the image size is too large or the saving duration is too long.

Prerequisites

The notebook instance is in Running state.

Saving an Image

  1. Locate the target notebook instance in the list and click Save Image in the Operation column.
  2. On the displayed page, set the parameters, select I understand the risks caused by the change and agree to save the image, and click OK.

    You can save the image as a new version of an existing image or create a new image.

    • Save as new version: Save the image as a new version of a registered image, that is, in an existing image folder in the Registered Images tab.
    • Create new image: The image will be saved to Software Repository for Container (SWR) and automatically registered with ModelArts upon completion.
    Table 1 Parameters

    Save Options

    Parameter

    Description

    Save as new version

    Image

    Click the image selection box. In the Image panel, select an image from the basic or enterprise edition as needed, and then click OK.

    Image Version

    Enter a version for the custom image. It can contain letters, digits, underscores (_), hyphens (-), and periods (.). The maximum length is 64 characters.

    Description

    Enter a description for the custom image. It cannot contain the characters & < > " ' /. The length must be between 0 and 256 characters.

    Create new image

    Image Repository

    Select SWR Basic Edition or SWR Enterprise Edition as needed. By default, SWR Basic Edition is used.

    If you want to use an enterprise repository, go to the SWR Enterprise Edition console to register one. The repository in the Enterprise Edition is identified by its registry name.

    For details about the differences between the basic and enterprise editions, see Differences Between SWR Basic and Enterprise Editions.

    Domain Name

    This parameter is mandatory only if Image Repository is set to SWR Enterprise Edition.

    It specifies the access address of the SWR Enterprise Edition instance.

    Namespace

    This parameter is mandatory only if Image Repository is set to SWR Enterprise Edition.

    Namespaces are used to isolate image repositories in SWR Enterprise Edition.

    Organization

    This parameter is mandatory only if Image Repository is set to SWR Basic Edition.

    Organizations are used in SWR to isolate images. An organization can represent a company or department, and its images are managed centrally under that organization. Different organizations may have images with identical names. An IAM user can join different organizations. Users in an organization can share all images in the organization.

    If no organization is available, click Go to SWR to create one. For details, see Organization Management.

    Image Name

    Enter a name for the custom image. It can only contain lowercase letters, digits, and special characters (_/.-). It must start and end with a lowercase letter or digit and cannot contain more than two consecutive underscores. The maximum length is 128 characters.

    Image Version

    Enter a version for the custom image. It can contain letters, digits, underscores (_), hyphens (-), and periods (.). The maximum length is 64 characters.

    Description

    Enter a description for the image. It cannot contain the characters & < > " ' /. The length must be between 0 and 256 characters.

  3. Wait until the image is saved. The image will be saved as a snapshot. The process takes approximately 3 to 10 minutes, during which the instance status will be Snapshotting. During this period of time, do not perform any operations on the instance. After the image is saved, the instance status changes to Running.
    • The time consumed during the snapshotting process is counted toward the total running time of the instance. If the instance stops because its scheduled running time expires while a snapshot is in progress, the image saving process will fail.
    • The connection may temporarily drop during the saving process; it will recover once the operation is complete.
    • The saved image does not contain files and data in the mount directory (/home/ma-user/work) used for persistent storage.
  4. View image details.
    1. In the navigation pane on the left, choose Asset Management > Image Management.
    2. In the Registered Images tab, click the name of the image to go to the image details page and view the image details.

Using a Custom Image to Create a Notebook Instance

The images saved from a notebook instance can be viewed on the Image Management or Images page. You can use these images to create new notebook instances, which inherit the software configurations of the original notebook instances.

Method 1: On the Create Notebook page, click Private Image and select the saved image.

Figure 1 Selecting a custom image to create a notebook instance

Method 2: On the Image Management or Images page, choose Registered Images and click the target image to access its details page. Then, click Create Notebook.

Which Data Can Be Saved When I Save an Image?

  • Data that can be saved: Files and directories that are statically added to images during container building.

    For example, dependencies and the /home/ma-user directory are saved in the image environment.

  • Data that cannot be saved: Mounting directories or data volumes that are dynamically connected to the host during container startup. You can run the df -h command to view the mounted dynamic directories. Data that is not in the / path will not be saved.

    For example, data that is persistently stored in home/ma-user/work and data that is dynamically mounted to /data is not saved.