Creating a Custom Image Using the Image Saving Function
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.
Images stored in a notebook instance cannot be larger than 35 GB and there cannot be more than 125 image layers. Otherwise, the image cannot be saved.
If error "The container size (xx) is greater than the threshold (25G)" is reported when an image is saved, handle the error by referring to 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.
Saving an Image
- Log in to the ModelArts management console. In the navigation pane on the left, choose DevEnviron > Notebook.
- In the notebook instance list, locate the target notebook instance and click More > Save Image in the Operation column. The Save Image dialog box is displayed.
Figure 1 Saving an image
- In the Save Image dialog box, configure parameters. Click OK to save the image.
Choose an organization from the Organization drop-down list. If no organization is available, click Create on the right to create one.
Users in an organization can share all images in the organization.
- The image is saved as a snapshot. The storage duration depends on the image size. During this period of time, do not perform any operations on the instance.
Figure 2 Saving an image
The time required for saving an image as a snapshot will be counted in the instance running duration. If the instance running duration expires before the snapshot is saved, saving the image will fail.
- After the image is saved, the instance status changes to Running. View the image on the Image Management page.
- Click the image name to view its details.
Creating a Notebook Instance Using a Custom Image
The images saved from a notebook instance can be viewed on the Image Management page. You can use these images to create new notebook instances, which inherit the software configurations of the original notebook instances.
You can use either of the following methods:
Method 1: On the Create Notebook page, click Private Image and select the saved image.
Method 2: On the Image Management page, click the target image to access its details page. Then, click Create Notebook.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot