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 UI. For details about the operation guide of the old-version UI, see Creating a Notebook Instance (Old Page).
- Create a notebook instance via ModelArts APIs. For details, see Creating a Notebook Instance.
Constraints
- When a notebook instance is created, auto stop is enabled by default. The notebook instance will automatically stop at the specified time.
- Only running notebook instances can be accessed or stopped.
- By default, each IAM user can create a maximum of 10 notebook instances.
- For single-PU instances powered by Snt9b2x (like Snt9b23) or D310P-300 resource pools, EVS disks cannot be used to create notebook instances (when Storage is set to EVS).
- Notebook does not support open ports for external services.
Precautions
Being a commissioning environment, notebooks allows you to download files via the public network using a public proxy. Therefore, do not download files larger than 10 GB from a notebook instance. Notebook provides limited public network access bandwidth, which ensures only network connectivity but not download speed.
Billing
- A running notebook instance will be billed based on 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 details, see Development Environment.
Creating a Notebook Instance
- 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 Tag and configure the tag key and tag value as required. You can add at most 20 tags.
After adding a tag, you can view, modify, or delete the tag on the Notebook page or the notebook instance details page. For details, see Editing a Tag.
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. You can select Custom to specify any integer from 1 to 72 hours.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
Select Image
Select Preset Images or Custom images as required and click
. On the displayed Image page, select the target 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 base, enterprise, or third-party image. To create a custom image, you must comply with the image specifications. After the build is complete, you must register the image on the Image Management page of ModelArts so that the image can be used in a notebook instance. For details, seeCreating 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 an image on a stopped notebook instance. For details, see Updating a Notebook Instance.
JupyterLab Version
ModelArts notebook supports the following two versions of JupyterLab. The default version is JupyterLab 4.
- JupyterLab 4: This version has significantly improved user experience, functions, and performance. For details, see Upgrading JupyterLab.
- JupyterLab 3: Support for creating new notebook instances using JupyterLab 3 will be discontinued in April 2026. Additionally, technical support, including updates for new features, vulnerability/issue fixes, patch upgrades, service ticket guidance, and online troubleshooting, will no longer be provided. These services will no longer be applicable to the O&M assurance of ModelArts. You are advised to use JupyterLab 4.
Resource
Resource Pool Type
Public and dedicated resource pools are available. A dedicated resource pool allows for mixed deployments using CPU, NPU, and GPU resources. If your node type supports both GPU and CPU, you can choose either GPU or CPU instance specifications.
- Public resource pool: It is billed based on the runtime of your notebook instances.
- Dedicated resource pool: The resources provided in a dedicated resource pool are exclusive and more controllable. In the Resource Pool area, click Select Resource Pool. On the Select Dedicated Resource Pool page, select a dedicated resource pool as required and click OK. If you do not have a dedicated resource pool, click Buy Dedicated Resource Pool in the lower part of the Select Dedicated Resource Pool page to purchase a dedicated resource pool. For details about the parameters for purchasing a dedicated resource pool, see Creating a Standard Dedicated Resource Pool.
NOTE:If the dedicated resource pool you purchased is a single-node Tnt004 pool whose specification is GPU: 1*tnt004 | CPU: 8 vCPUs 32GiB (modelarts.vm.gpu._tnt004u8), when you use the cluster to create a notebook instance, the Tnt004 PU is idle but is displayed as sold out or the creation fails due to insufficient resources, contact technical support.
Instance Specifications
The system will select an instance specification by default. You can click
to change the specification. In the displayed dialog box, select a CPU, NPU, or GPU specification as required and click OK.Specification Type
Preset and custom specifications are supported.
Custom specifications are only supported when the Resource Pool Type is set to Dedicated resource pool and the node pool flavor is GPU, CPU, or a heterogeneous resource pool (e.g., CPU+CPU or GPU+CPU). They are not supported for public resource pools and NPU-based dedicated resource pools.
NOTE:If there are NPU nodes in a heterogeneous resource pool, only the NPU nodes do not support custom specifications.
- Preset specifications: Select the preset ModelArts instance specifications from the drop-down list.
- Custom specifications: Customize the GPU/CPU and memory specifications based on the nodes in the resource pool.
To prevent scheduling failures when using custom specifications, reserve an additional 0.5 vCPUs | 1 GiB of notebook system resources in addition to the configured specifications. For example, a notebook instance with custom specifications of 0.5 vCPUs | 512 MiB requires 1 vCPU | 1.5 GiB of available node resources.
To view the node details of the resource pool, go to the ModelArts console, choose Resource Management > Dedicated Compute Resources > Resource Pools or Resource Management > Dedicated Resource Pool.
The values of custom specifications are as follows:
- GPUs
To use GPU virtualization, ensure the requirements are met. For details, see Using GPU Virtualization.
- H20 nodes
To view the node type, log in to the ModelArts console, choose Resource Management > Dedicated Compute Resources > Resource Pools or Resource Management > Dedicated Resource Pool, click the name of the target resource pool, and check whether its instance specifications include h20 in the Nodes tab. h20 indicates that the node type is H20.
Figure 2 H20 model
- Use AI Suite (NV GPU) plugin 2.12.0. To view or upgrade the AI Suite (NV GPU) plugin version, see AI Suite (NV GPU).
- Volcano Scheduler has been installed. For details about how to install Volcano Scheduler, see Volcano Scheduler.
Value description:- When the value is less than 1, the step is 0.1 (range: [0.0, 0.9]).
- When the value is 1 or greater, the step is 1 (integer values only).
- H20 nodes
- vCPUs
- Memory (MiB)
- GPUs
Node affinity scheduling
This parameter is available only when Resource Pool Type is set to Dedicated resource pool.
After you set node affinity, pods can be scheduled to specific node for fine-grained resource management and optimization. ModelArts allows fine-grained control over Pod deployment strategies, including: strict placement (strong affinity), preferred placement (weak affinity), prohibited placement (strong anti-affinity), and avoided placement (weak anti-affinity).
After you enable this function, set the affinity type, strength, and nodes in the displayed Affinity-based Scheduling Policy window, and click OK.- If Affinity Type is set to Node Affinity and Strength is set to Weak, the system will try to schedule pods to the specified node, however, the scheduling may fail.
- If Affinity Type is set to Node Affinity and Strength is set to Strong, the system will ensure that the pods are scheduled to the specified node. Otherwise, the pods will not be scheduled.
- If Affinity Type is set to Node Anti-Affinity and Strength is set to Weak, the system will avoid scheduling pods to the specified node, however, this operation may fail.
- If Affinity Type is set to Node Anti-Affinity and Strength is set to Strong, the system will ensure that the pods will not be scheduled to the specified node. Otherwise, this operation will not be performed at all. You cannot select all nodes. However, you need to reserve at least one available node. Otherwise, the scheduling policy cannot be executed.
Storage Settings
Storage Type
Select Elastic Volume Service, Object Storage Service – Parallel File System, Object Storage Service – Bucket, Scalable File Service, or OceanStor Pacific as required. Storage configuration varies depending on the selected resource type and specifications. For details about storage types, see Storage Types.
NOTE:Object Storage Service – Bucket and Object Storage Service – Parallel File System are under restricted use. 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 type only for a dedicated resource pool. SFS takes effect only after a dedicated resource pool can communicate with your VPC. For details, see Step 1: 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.
- Select Object Storage Service – Bucket or Object Storage Service – Parallel File System as the storage location.
Click
under Storage Path. In the displayed dialog box, select the OBS path for storing notebook data and click OK. 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
You can add different types of extended storage as required. The maximum number of extended storage configurations that can be added varies depending on the storage type. Check the console for details. You can delete unnecessary extended storage configurations.
For details about storage types, see Storage Types.
- If you select Object Storage Service – Bucket or Object Storage Service – Parallel File System as the storage type, set the following parameters:
- Mounted Subdirectory: Click
to select a storage address or enter a storage address, for example, obs://bucketname/path/. The mounted subdirectory must start with obs:// or /, end with /, and must not contain // (except for the prefix). - Cloud Mount Path: Enter a mount path, for example, /temp/. The mount path cannot be empty. It cannot be a blacklisted directory and must start and end with a slash (/). It can contain only letters, digits, underscores (_), and hyphens (-).
- Mounted Subdirectory: Click
- If you select Scalable File Service (only supported by dedicated resource pools), set the following parameters:
- Scalable File Service: Select a file system as required.
- Mounted Subdirectory: The subdirectory mount path must start and end with a slash (/) and can contain only letters, digits, underscores (_), and hyphens (-).
- Cloud Mount Path: The mount path cannot be empty. It cannot be a blacklisted directory and must start and end with a slash (/). It can contain only letters, digits, underscores (_), and hyphens (-).
NOTE: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 adding extended storage, you can view or edit the extended storage information in the Storage tab of the notebook instance details page. If the number of storage devices does not reach the maximum, you can click Add Extended Storage. For details, see Dynamically Mounting an OBS Parallel File System.
Authentication Information
Secret
This parameter is mandatory when the storage type is set to Object Storage Service – Bucket or Object Storage Service – 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.
Select an existing key pair or click Create Key Pair on the right to create one. On the displayed page, choose Key Pair Service from the navigation pane. Then, click the Account Key Pairs tab and click Create Key Pair.
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.
Network
If this function is enabled, you can configure the VPC to connect the notebook instance to the network.
After this function is enabled, the instance can be mounted to your VPC to implement access of multiple network planes.
Before using this function, configure fine-grained VPC access authorization. For details, see Creating an IAM User and Granting ModelArts Permissions. 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 click Create VPC as required. In the displayed Create VPC dialog box, configure related information, click OK, and select the new VPC from the drop-down list.
- Subnet: After a VPC is selected, the default subnet is displayed. You can also select an existing subnet from the drop-down list, or click Create Subnet and configure parameters in the displayed Create Subnet dialog box, click OK, and select the new subnet from the drop-down list.
- Security Group: Select an existing security group or click Create Security Group. In the displayed dialog box, configure related information and click OK. Select the new security group from the drop-down list.
Specify User
When starting a notebook instance, ModelArts supports the following two running user configurations. Supported configurations may vary depending on the resource settings.
Only dedicated resource pools in the new network mode support starting notebook instances as the root user. For details, see Starting a Notebook Instance as User root. For details about how to create a dedicated resource pool in the new network mode, see Creating a Dedicated Resource Pool.
- ma-user/ma-group: The default non-privileged user configuration for ModelArts public images (security mode). To use this mode, the following conditions must be met:
- User: ma-user (UID: 1000)
- User group: ma-group (GID: 100)
Note: If you are using a custom image, you must pre-configure the above user and group in your image; otherwise, the container may fail to start or experience service exceptions due to insufficient permissions. For details about how to add a specific user and user group, see Dockerfile on a Non-ModelArts Base Image.
- root/root: Runs the notebook instance with highest privileges. This is suitable for scenarios requiring access to system-level resources but involves potential security risks. When root/root is selected, the system forcibly binds the following user and group:
- User: root (UID: 0)
- User group: root (GID: 0)
Note: Modifying the UID/GID or the associated group for root is strictly prohibited, as doing so may cause container permission conflicts or security vulnerabilities.
- 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.
If an error occurs when you create or use a notebook instance, you can rectify the fault by referring to Troubleshooting and FAQs.
- In the notebook instance list, click the instance name. On the displayed instance details page, view the instance configuration.
When the SSH remote development feature is enabled and the notebook instance is in the Stopped state, you can click
to the right of Authentication to update the key pair. For details about how to enable SSH remote development, see Configuring Remote SSH Connection for a Notebook Instance.Figure 3 Updating a key pair
In the Storage tab, click Mount Storage to mount a 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.
- Online access using JupyterLab. For details, see Using a Notebook Instance for AI Development Through JupyterLab.
- 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. On the notebook instance details page, you can view the SSH remote development address. Figure 5 Using user root for remote SSH connection
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 directory mounting of a notebook instance, see Table 2. The following mounting points 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 parallel file system. |
| /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. |
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 if an error occurs during the startup of JupyterLab 4?
Locate the target instance in the list and click Start in the Operation column. In the displayed dialog box, select JupyterLab 3 and click OK.
- Can I use both JupyterLab 3 and 4 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.
- How do I upgrade a notebook instance from JupyterLab 3 to JupyterLab 4?
You can use either of the following methods to upgrade to JupyterLab 4. For details, see Upgrading JupyterLab.
- Method 1: Stop the notebook instance and upgrade JupyterLab.
- Method 2: Save the notebook instance and upgrade JupyterLab.
- 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