Help Center/ ModelArts/ Drawer/ DevEnviron/ Saving an Image
Updated on 2024-12-31 GMT+08:00

Saving an Image

To save a notebook environment image, do as follows: Create a notebook instance using a preset image, install custom software and dependencies on the instance, and save the running instance as a container image.

In the saved image, the installed dependency package is retained, but the data stored in home/ma-user/work for persistent storage will not be stored. In remote development through VS Code, the plug-ins installed on the server are retained in the saved image.

No more than 125 image layers can be saved in a notebook instance. Otherwise, the image cannot be created.

If "The container size (xx) is greater than the threshold (25G)" is reported when you save an image, see What Do I Do If Error "The container size (xG) is greater than the threshold (25G)" Is Reported When I Save an Image?.

Prerequisites

The notebook instance is in Running state.

FAQs

What Do I Do If Error "there are processes in 'D' status, please check process status using 'ps -aux' and kill all the 'D' status processes" Is Displayed When I Save an Image in a Notebook Instance?

If there is a process in the D state in the notebook instance, saving an image will fail. For details, see What Do I Do If Error "there are processes in 'D' status, please check process status using 'ps -aux' and kill all the 'D' status processes" Is Displayed When I Save an Image?.

What Do I Do If Error "container size %dG is greater than threshold %dG" Is Displayed When I Save an Image in a Notebook Instance?

The cause is that the size of the notebook container exceeded the threshold. For details, see What Do I Do If Error "container size %dG is greater than threshold %dG" Is Displayed When I Save an Image?.

What Do I Do If Error "too many layers in your image" Is Displayed When I Save an Image in a Notebook Instance?

Cause: The image selected for creating the target notebook instance is a bring-your-own image or a custom image that has been saved for multiple times. No image can be saved for the notebook instance that is created using such an image.

Solution: Use a public image or another custom image to create a notebook instance and save the image.

What Do I Do If Error "The container size (xG) is greater than the threshold (25G)" Is Displayed When I Save an Image in a Notebook Instance?

Saving an image is to execute docker commit on the agent of a resource cluster node. Management data will be uploaded and updated automatically. Each time docker commit is executed, the image becomes larger. After the image is saved for multiple times, its actual size is larger than it shows. If the image is too large, various problems may occur.

Solution: Rebuild the environment based on the original image. Use a base image and install only necessary runtime dependencies. Clear the installation cache and save the image.