Creating a Notebook Instance (New Page)

ModelArts has enhanced the creation page to improve the efficiency of creating notebook instances. The updated page streamlines operations and enhances the GUI display.
Before developing a model, create a notebook instance and access it for coding.
You can create a notebook instance in either of the following ways:
- Create a notebook instance on the ModelArts console. This section provides the operation guide of the new page. For details about the operation guide of the old (default) page, see Creating a Notebook Instance (Default Page).
- Create a notebook instance via ModelArts APIs. For details, see Creating a Notebook Instance.
Constraints
- Auto stop is enabled by default during notebook instance creation, that is, the notebook instance will automatically stop at the specified time to avoid resource waste.
- Only running notebook instances can be accessed or stopped.
- A maximum of 10 notebook instances can be created under an account.
Billing
- A running notebook instance will be billed based on the used resources. The fees vary depending on your selected resources. For details, see Pricing Details. When a notebook instance is not used, stop it.
- If you select EVS for storage when creating a notebook instance, the EVS disk will be continuously billed if the instance is not deleted. Stop and delete the notebook instance if it is not required. For more information, see Development Environment.
Procedure
- Log in to the ModelArts console. In the navigation pane on the left, choose Permission Management and check whether the access authorization has been configured. If not, configure access authorization. For details, see Configuring Agency Authorization for ModelArts with One Click.
Figure 1 Viewing agency configurations
- Log in to the ModelArts console. In the navigation pane on the left, choose Development Workspace > Notebook.
- Click Create Notebook in the upper right corner. On the displayed page, configure the parameters by referring to the following table.
Table 1 Parameters for creating a notebook instance Parameter
Description
Basic Information
Name
Name of the notebook instance, which is automatically generated by the system. You can rename it as required. The name can contain at most 128 characters and cannot be left empty. Only digits, letters, underscores (_), and hyphens (-) are allowed.
Add Description
Click Add Description to customize the notebook instance description, which cannot exceed 512 characters.
Tags
To add the same tag to different cloud resources, use Tag Management Service (TMS) to create predefined tags. For details, see Creating Predefined Tags.
Click Add and enter a tag key and value. You can add at most 20 tags.
After adding a tag, you can view, modify, or delete the tag on the notebook instance details page.
NOTE:You can select a predefined TMS tag from the tag drop-down list or customize a tag. Predefined tags are available to all service resources that support tags. Customized tags are available only to the service resources of the user who has created the tags.
Auto Stop
This function is enabled by default. The notebook instance tracks its runtime once started. It stops automatically if the runtime surpasses the set time limit.
Stop Type: Select Stop as scheduled. In this case, the notebook instance automatically stops when the runtime exceeds the specified time. You can select 1 hour, 2 hours, 4 hours, 6 hours, or Custom. If Custom is selected, enter any integer within the range of 1 to 72.CAUTION:To protect in-progress jobs, a notebook instance does not automatically stop immediately at the auto stop time. Instead, there is a 2 to 5 minutes delay for you to renew the auto stop time.
Environment
Image
Click Select Image. On the Image panel, select a preset image or a custom image, and click OK.
- Preset images are the AI engines built in ModelArts.
- You can use a custom image created by yourself. Use either of the following ways to create a custom image:
- Save the instance created using the preset image and use it as a custom image. For details, see Saving a Notebook Instance.
- Create a custom image using a public or third-party image. Custom images must meet the image specifications. After the image is created, register it on the image management page of ModelArts before using it in a notebook instance. For details, see Creating a Custom Image.
An image corresponds to an AI engine. When you select an image during instance creation, the AI engine is specified accordingly. Select an image as required. Enter a keyword of the image name in the search box on the right to quickly search for the image.
You can change the image on a stopped notebook instance.
JupyterLab Version
JupyterLab supports the following two versions. The default version is 3.2.3. User experience and version stability vary among the two versions.
- 3.2.3: A stable version that has been widely verified and is suitable for long-term use. Select this version if you need a stable working environment.
- 4.3.1: The latest version that includes multiple new functions and improvements, but may be unstable. Select this version to experience the latest functions. For details, see JupyterLab 4.3.1.
NOTE:
JupyterLab 3.2.3 will be gradually brought offline. Select a version based on your requirements.
Resource
Resource Pool Type
Public and dedicated resource pools are available. For dedicated resource pools, you can select heterogeneous resource pools of CPUs, NPUs, and GPUs. For example, if the node flavor supports CPUs and GPUs, you can select CPUs or GPUs as the instance specifications.
Public resource pools are billed based on the runtime of your notebook instances.
Select a created dedicated resource pool based on site requirements. If no dedicated resources are available, purchase one.
NOTE:If the dedicated resource pool you purchased is a single-node Tnt004 pool whose specification is GPU: 1*tnt004 | CPU: 8 vCPUs and 32 GiB (modelarts.vm.gpu._tnt004u8), when you use the cluster to create a notebook instance, the Tnt004 card is idle but is displayed as sold out or the creation fails due to insufficient resources, contact technical support.
Instance Specifications
Based on the chip you select (CPU or GPU), the available resource specifications vary. Select the specifications based on your needs.
- The following shows examples of CPU specifications:
2vCPUs 8GB: General-purpose Intel CPU flavor, ideal for rapid data exploration and experiments.
8vCPUs 32GB: General computing-plus Intel CPU flavor, ideal for compute-intensive applications.
- The following shows examples of GPU specifications:
GPU: 1*Vnt1(32GB)|CPU: 8vCPUs 64GB: Single GPU with 32 GB of memory, ideal for algorithm training and debugging in deep learning scenarios.
GPU: 1*Tnt004(16GB)|CPU: 8vCPUs* 32GB: Single GPU with 16 GB of memory, ideal for inference computing such as computer vision, video processing, and NLP tasks.
GPU: 1*Pnt1(16GB)|CPU: 8vCPUs 64GB: Single GPU with 16 GB of memory, ideal for algorithm training and debugging in deep learning scenarios.
Storage Settings
Storage Type
Select Elastic Volume Service or Object Storage Service as required. For details about the storage types, see Selecting Storage for a Notebook Instance.
NOTE:OBS and PFS are whitelist functions. Submit a service ticket for a trial if required.
- Elastic Volume Service
Set a disk size based on service requirements. The default value is 5 GB. The maximum disk size is displayed on the GUI.
The EVS disk space is charged by GB from the time the notebook instance is created to the time the notebook instance is deleted.
-
Select this only for a dedicated resource pool. SFS takes effect only after a dedicated resource pool can communicate with your VPC. For details, see Creating a Network.
NOTE:For details about how to set permissions to access SFS Turbo folders, see Permissions Management.
- Scalable File Service: Select a created SFS Turbo file system. To create an SFS Turbo file system, log in to the SFS console.
- Cloud Mount Path: Retain the default value /home/ma-user/work/.
- Mounted Subdirectory: Select the storage path on SFS Turbo.
- Mount Method: This parameter is displayed when the folder control permission is granted for the user. The read/write or read-only permission is displayed based on the storage path on SFS Turbo.
- Object Storage Service or Parallel File System
Storage Path: Set the OBS path for storing notebook data. If you want to use existing files or data, upload them to the specified OBS path. Storage Path must be set to a specific directory in an OBS bucket rather than the root directory of the OBS bucket.
EVS and SFS are all mounted to the /home/ma-user/work directory.
You can add a data storage path during the runtime of a notebook instance by referring to Dynamically Mounting an OBS Parallel File System.
Data stored in the directory is retained even if the notebook instance is stopped or restarted.
When a notebook instance is deleted, the EVS storage is released and the stored data is not retained. SFS can be mounted to a new notebook instance and data can be retained.
Expansion Storage
This is a whitelist function. Submit a service ticket for a trial if needed.
If you have multiple data storage paths, click Add PFS, Add OBS, or Add SFS as required to add specific storage mount directories.
Constraints:
- For each type, a maximum of five directories can be mounted.
- The directories must be unique and cannot be mounted to a blacklisted directory. Nested mounting is allowed. Blacklisted directories are those with the following prefixes:
/data/, /cache/, /dev/, /etc/, /bin/, /lib/, /sbin/, /modelarts/, /train-worker1-log/, /var/, /resource_info/, /usr/, /sys/, /run/, /tmp/, /infer/, and /opt/
After this parameter is configured, the notebook instance details page is displayed. Click Storage > Extended Storage to view or edit the extended storage information. If the number of storage devices does not reach the maximum, you can click Add Extended Storage.
Authentication Information
Secret
This parameter is mandatory when Storage Type is set to Object Storage Service or Parallel File System.
Select an existing secret or click Create Credential on the right to create one. On the displayed DEW console, create a secret, and enter the secret key/value and user AK/SK.
More Settings
Remote SSH
After you enable this function, you can remotely access the development environment of the notebook instance from your local development environment.
When a notebook instance is stopped, you can update the SSH configuration on the instance details page.
The notebook instances with remote SSH enabled have VS Code plug-ins (such as Python and Jupyter) and the VS Code server package pre-installed, which occupy about 1 GB persistent storage space.
Key Pair
Set a key pair after remote SSH is enabled.
You can select an existing key pair or click Create Key Pair on the right to create one on the displayed Create Account Key Pair page.
After a notebook instance is created, you can change the key pair on the instance details page.
CAUTION:Download the created key pair and properly keep it. When you use a local IDE to remotely access the notebook development environment, the key pair is required for authentication.
Whitelist
Set a whitelist after remote SSH is enabled. This parameter is optional.
Add the IP addresses for remotely accessing the notebook instance to the whitelist, for example, the IP address of your local PC or the public IP address of the source device. A maximum of five IP addresses can be added and separated by commas (,). If the parameter is left blank, all IP addresses will be allowed for remote SSH access.
If your source device and ModelArts are isolated from each other in network, obtain the public IP address of your source device using a mainstream search engine, for example, by entering "IP address lookup", but not by running ipconfig or ifconfig/ip locally.
After a notebook instance is created, you can change the whitelist IP addresses on the instance details page.
Network
If this function is enabled, you can configure the VPC to connect the notebook instance to the network. This is a whitelist function. Submit a service ticket for a trial if required.
After this function is enabled, the instance can be mounted to your VPC to implement access of multiple network planes.
Before using this function, you need to configure VPC fine-grained access authorization by referring to Configuring Agency Authorization for ModelArts with One Click. If you have the VPC Administrator permission, you do not need to set this parameter.
- VPC: Select an existing VPC from the drop-down list or create one as required.
- Subnet: After you select a VPC, the default subnet is displayed. Select an existing subnet from the drop-down list or create one as required.
- Security Group: Select an existing security group or create one as required.
- After all parameters are set, the configuration summary is displayed on the right, and the fee is displayed in the lower part. Confirm the information and click Next.
The final bill may vary slightly. Switch to the notebook instance list. The notebook instance is being created. It will take several minutes before its status changes to Running. Then, the notebook instance is created.
- In the notebook instance list, click the instance name to access its details page, and view the instance configurations.
If Remote SSH is enabled, you can click the modification icon on the right of the whitelist to modify it. You can click the modification icon on the right of Authentication to update the key pair of a stopped notebook instance.
In the Storage tab, click Mount Storage to mount an OBS parallel file system to the instance for reading data. For details, see Dynamically Mounting an OBS Parallel File System.
If an EVS disk is used, click Expansion on the right of Storage Capacity to dynamically expand the EVS disk capacity. For details, see Dynamically Expanding EVS Disk Capacity.
Accessing a Notebook Instance
Access a notebook instance in the Running state for coding.
- Accessed online using JupyterLab. For details, see Using a Notebook Instance for AI Development Through JupyterLab.
- Remotely accessed from a local IDE through PyCharm. For details, see Using Notebook Instances Remotely Through PyCharm.
- Remotely accessed from a local IDE through VS Code. For details, see Using Notebook Instances Remotely Through VS Code.
- Remotely accessed from a local IDE through SSH. For details, see Using a Notebook Instance Remotely with SSH.
ModelArts notebook instances are started by ma-user by default. After you access the instance, the default working directory is /home/ma-user/work.

Most notebook instances in a dedicated resource pool are started as user root. The details are as follows:
- When you log in to the terminal as user root, the system automatically runs the source /home/ma-user/.bashrc command to synchronize the environment variables of user ma-user. To disable this function, set the environment variable export DISABLE_MA_USER_BASHRC to true in the custom image to prevent the /home/ma-user/.bashrc file from being loaded.
- If the instance is started by user root, only user root can be used for SSH remote connection.
Figure 3 Using user root for SSH remote connection
JupyterLab 4.3.1
This version has significantly improved user experience, functions, and performance. The table below lists the main updates. For further information, see JupyterLab Documentation.
Function Module |
Description |
---|---|
Workspaces |
You can create multiple workspaces to organize and manage different projects and files, improving project management efficiency. |
Launcher creation toolbar |
Added a toolbar for functional access and convenient operations. |
Theme framework |
Optimized the theme framework to enhance the theme flexibility and compatibility. You can customize the GUI as required. |
Configuration page |
Optimized user experience on the configuration page for easier use. |
Performance and debugging |
Fully optimized the system performance and enhanced the debugging function to improve the development experience. |
Code editor |
Improved the code editor by adding more functions and optimizing performance to improve the code writing and editing experience. |
Search function |
Enhanced the search function for quicker and more accurate search. |
Performance |
Improved the overall performance, system response speed, and system stability. |
Custom CSS style sheets |
Custom CSS style sheets can be used to adjust the GUI appearance to meet personalized requirements. |
Markdown charts |
Charts can be used in Markdown to facilitate document writing. |
Virtual scroll bar |
Introduced the virtual scroll bar to improve the scrolling experience of large files or a large amount of content. |
Workspace UI |
Improved the workspace UI to provide better visual effect and operation experience and enhance UI friendliness. |
File access records |
You can view recently opened and closed files to quickly access common files and improve work efficiency. |
Keyboard shortcuts |
Keyboard shortcuts are improved for higher operation efficiency and convenience. |
Mounting Directories of Notebook Containers
When you use EVS storage when creating a notebook instance, the /home/ma-user/work directory is used as the workspace for persistent storage.
The data stored in only the work directory is retained after the instance is stopped or restarted. When you use a development environment, store the data for persistence in /home/ma-user/work.
For details about mounting directories of a notebook instance, see Table 3. The mounting points listed in the following table are not saved when images are saved.
Mount Point |
Read Only |
Remarks |
---|---|---|
/home/ma-user/work/ |
No |
Persistent directory of your data. |
/data |
No |
Mount directory of your PFS. |
/cache |
No |
Used to mount the hard disk of the host NVMe (supported by bare metal specifications). |
/train-worker1-log |
No |
Compatible with training job debugging. |
/dev/shm |
No |
Used for PyTorch engine acceleration. |
Selecting Storage for a Notebook Instance
Storage varies depending on performance, usability, and cost. No storage media can cover all scenarios. Learning about in-cloud storage application scenarios for better usage.
Storage Type |
Application |
Advantage |
Disadvantage |
---|---|---|---|
EVS |
Data and algorithm exploration only in the development environment. |
Block storage SSDs feature better overall I/O performance than NFS. The storage capacity can be dynamically expanded to up to 4096 GB. As persistent storage, EVS disks are mounted to /home/ma-user/work. The data in this directory is retained after the instance is stopped. The storage capacity can be expanded online based on demand. |
This type of storage can only be used in a single development environment. |
PFS |
NOTE:
PFS buckets mounted as persistent storage for AI development and exploration.
|
PFS is an optimized high-performance object storage file system with low storage costs and large throughput. It can quickly process high-performance computing (HPC) workloads. PFS mounting is recommended if OBS is used.
NOTE:
Package or split the data to be uploaded by 128 MB or 64 MB. Download and decompress the data in local storage for better I/O and throughput performance. |
Due to average performance in frequent read and write of small files, PFS storage is not suitable for large model training or file decompression.
NOTE:
Before mounting PFS storage to a notebook instance, grant ModelArts with full read and write permissions on the PFS bucket. The policy will be retained even after the notebook instance is deleted. |
OBS |
NOTE:
When uploading or downloading a large amount of data in the development environment, you can use OBS buckets to transfer data. |
Low storage cost and high throughput, but average performance in reading and writing small files. It is a good practice to package or split the file by 128 MB or 64 MB. In this way, you can download the packages, decompress them, and use them locally. |
The object storage semantics is different from the Posix semantics and needs to be further understood. |
SFS |
Available only in dedicated resource pools. Use SFS storage in informal production scenarios such as exploration and experiments. One SFS device can be mounted to both a development environment and a training environment. In this way, you do not need to download data each time your training job starts. This type of storage is not suitable for heavy I/O training on more than 32 cards. |
SFS is implemented as NFS and can be shared between multiple development environments and between development and training environments. This type of storage is preferred for non-heavy-duty distributed training jobs, especially for the ones not requiring to download data additionally when the training jobs start. |
The performance of the SFS storage is not as good as that of the EVS storage. |
OceanStor Pacific storage (SFS capacity-oriented 2.0) |
Currently, it can be used only in Tiangong resource pools. It is suitable for the training jobs that use the file systems provided by SFS capacity-oriented 2.0 for AI model training and exploration. In addition, OBS APIs are provided to import training data from outside the cloud. |
It provides a high-performance file client to meet the high storage bandwidth requirements of heavy-load training jobs. It also supports access to OBS. After the training data is imported to the storage via OBS APIs, it can be used to train the model directly without any conversion. |
It provides the object storage semantics, which is different from the Posix semantics and needs to be further understood. |
Local storage |
First choice for heavy-duty training jobs. |
High-performance SSDs for the used VM or BMS, featuring high file I/O throughput. For heavy-duty training jobs, store data in the target directory and then start training. By default, the storage is mounted to the /cache directory. For details about the available space of the /cache directory, see What Are Sizes of the /cache Directories for Different Notebook Specifications in DevEnviron? |
The storage lifecycle is associated with the container lifecycle. Data needs to be downloaded each time the training job starts. |
FAQ
- How do I use EVS in a development environment?
When creating a notebook instance, select a small-capacity EVS disk. You can scale out the disk as needed. For details, see Dynamically Expanding EVS Disk Capacity.
- How do I use an OBS parallel file system in a development environment?
When training data in a notebook instance, you can use the datasets mounted to a notebook container, and use an OBS parallel file system. For details, see Dynamically Mounting an OBS Parallel File System.
- How do I switch back to JupyterLab 3.2.3 if an error occurs during the startup of JupyterLab 4.3.1?
Locate the target instance in the list and click Start in the Operation column. In the displayed dialog box, select JupyterLab 3.2.3 and click OK.
- Can I use both JupyterLab 3.2.3 and 4.3.1 in a project?
Not recommended. Each JupyterLab instance runs independently. Therefore, you need to create an instance for each version. To try different versions, you can start them in different containers or environments. Pay attention to the following:
- The configuration file and data path may vary according to the version. Ensure the independence of data and configuration.
- Running multiple versions at the same time may cause port conflicts or other resource competition problems.
- Can I use GDB in a notebook instance?
No. GDB needs Docker with privileged containers. For security purposes, the development environment does not allow privileged containers. Therefore, GDB cannot be used in notebook instances.
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