Creating a Notebook Instance
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. The following sections describe how to create a notebook instance on the console.
- 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.
- If a dedicated resource pool node is set as a hot standby node, it cannot run notebook instances, such as creating or starting notebook instances. For details about how to disable hot standby nodes, see Rectifying a Faulty Node in a Dedicated Resource Pool.
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, choose Permissions Management. On the agency list page, check whether an agency has been configured. If no agency has been configured, configure one first. For details, see Configuring Agency Authorization for ModelArts with One Click. Figure 1 Viewing agency configurations
- Log in to the ModelArts console and perform the following operations as required:
- New console: Choose Model Build > Notebook.
- Old console: Choose Development Space > Notebook.
- Click Create Notebook in the upper right corner. On the displayed page, configure the parameters by referring to the following table.
- Basic information
Parameter
Description
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 write a custom description for your notebook instance. The description can be up to 512 characters long.
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. Custom tags are available only to the service resources of the user who has created the tags.
- Auto stop
Parameter
Description
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 or Idle stop. Once enabled, the notebook instance automatically stops when the runtime exceeds the specified duration. 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 period of 2 to 5 minutes provided for you to renew the auto stop time.
Idle stop: If this option is enabled, the notebook instance automatically stops when its idle duration exceeds the specified duration. You can select 15 minutes, 30 minutes, 1 hour, 2 hours, or Custom. You can select Custom to specify any integer from 1 to 72 hours.NOTE:Idle stop is in the restricted use phase. To try it, submit a service ticket to request permission.
- Environment settings
Parameter
Description
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, 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 an image on a stopped notebook instance. For details, see Updating a Notebook Instance.
WebIDE
JupyterLab and Code Server are supported. In the lower right corner of the card, click
to switch the version. For details about the restrictions and operation guide for using Code Server, see Constraints.- JupyterLab: 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 October 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.
- Code Server: Code Server 4 leverages VS Code 1.85 and offers full remote development with a built-in terminal, Git, a debugger, and a wide range of extensions.
- Resource settings
Parameter
Description
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 selects an instance specification by default. You can change it as required.
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 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, or Scalable File Service Turbo (SFS Turbo) as required. Storage configuration varies depending on the selected resource type and specifications. For details about storage types, see Notebook Storage Types.
If you associate an SFS Turbo file system with an OBS bucket and mount the file system to a notebook instance, there are some restrictions. For details, see Managing SFS Turbo+OBS Storage Interworking.
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.
Notes
- The EVS disk is mounted to the /home/ma-user/work directory as persistent storage.
- The content in this directory is retained after the instance is stopped.
- You are billed by GB from the time when a notebook instance is created to the time when it is deleted.
- Select Scalable File Service Turbo (SFS Turbo) as the storage location. This option is only supported by dedicated resource pools. It only takes effect after the dedicated resource pool can communicate with your VPC or is associated with SFS Turbo. For details about how to connect a VPC, see ModelArts Network. For details about how to associate a dedicated resource pool with SFS Turbo, see Associating an SFS Turbo File System.NOTE:
For details about how to set permissions to access SFS Turbo folders, see Permissions Management.
- File System: Select the created SFS Turbo file system. If no SFS Turbo file system is available, log in to the SFS console to create one.
- File System Directory: Enter the directory of the file system.
Notes
- The storage is mounted to the /home/ma-user/work directory.
- The content in this directory is retained after the instance is stopped.
- SFS Turbo takes effect only after it is associated with the network corresponding to the dedicated resource pool. After the configuration, refresh the page for the configuration to take effect.
- Select Object Storage Service – Bucket or Object Storage Service – Parallel File System as the storage location.
Enter the storage address (for example, obs://bucketname/path/) under Storage Address, or click
. On the Select Storage Address panel, 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.Notes
- The file system is mounted to the /home/ma-user/work directory. The file addition, deletion, and modification operations in the notebook instance are synchronized to the OBS bucket or parallel file system.
- The content in this directory is retained after the instance is stopped.
EVS and SFS Turbo 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 Notebook Storage Mount Methods.
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
Click Add Extended Storage to add different types of extended storage as required. A maximum of 30 extended storage configurations can be added. You can delete unnecessary extended storage configurations.
For details about storage types, see Notebook Storage Types.
If you associate an SFS Turbo file system with an OBS bucket and mount the file system to a notebook instance, there are some restrictions. For details, see Managing SFS Turbo+OBS Storage Interworking.
- Storage type: Object Storage Service – Bucket or Object Storage Service – Parallel File System
- Storage Address: Enter a storage address, for example, obs://bucketname/path/. The storage address must start with obs:// or /, end with /, and must not contain // (except for the prefix).
- 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 (-).
- If you select Scalable File Service Turbo (SFS Turbo) (only supported by dedicated resource pools), set the following parameters:
- File System: Select a file system as required.
- File System Directory: Enter the file system directory. The mount path cannot be empty. It cannot be a blacklisted directory.
- Mount Path: Enter the 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 Notebook Storage Mount Methods.
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
Parameter
Description
Remote SSH
Once enabled, you can remotely log in to the notebook instance via VS Code from your local IDE. This function has prerequisites and connection upper limits. Before using this function, view the SSH Constraints to prevent notebook instance response timeout or interruption, which affects normal use.
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 extensions (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 go to the DEW console. On the Key Pair Service page, click the Account Key Pairs or Private Key Pairs tab and then 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 the 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.
- Basic information
- 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.
If the notebook instance status is Running, the notebook instance has been created.
On the Notebook page, you can perform the following operations.
Table 1 Notebook operations Operation
Description
Reference
Viewing details about a notebook instance
View details about a notebook instance, including basic information, storage, and events.
Searching for a notebook instance
The Notebook page displays all created instances. Use filters to quickly locate a specific instance.
Accessing an environment
Open a running notebook instance to start coding in the development environment.
Saving an image
Create a notebook instance using a preset image, install custom software and dependencies on the base image, and save the running instance environment as a container image.
Stopping, starting, or deleting a notebook instance
Running notebook instances continuously consume resources. Stop an instance to pause billing, and restart it later if needed.
Delete instances that are no longer needed to free up resources. Deletion is irreversible, and all data in the mounted directories will be permanently removed.
Changing an image
Switch images within the same notebook instance to change your AI engine. The instance must be in the Stopped state to perform this operation.
Changing instance specifications
Switch node specifications within the same instance to optimize resource allocation. The instance must be in the Stopped, Running, or Start Failed state to perform this operation.
Configuring node affinity scheduling
Use node affinity to ensure pods are scheduled to nodes meeting specific conditions, enabling fine-grained resource management and optimization.
Configuring auto stop
Enable this feature to set an auto-stop method and duration. The instance automatically stops once the threshold is exceeded. (There may be a 2–5 minute delay, which is billed normally.)
Editing tags
Use tags to categorize, search, identify, and manage your notebook instances.
Viewing Details About a Notebook Instance
- Log in to the ModelArts console and perform the following operations as required:
- New console: Choose Model Build > Notebook.
- Old console: Choose Development Space > Notebook.
- In the notebook instance list, click the name of the target instance. Figure 3 Notebook instance details
Table 2 Notebook instance details Tab
Description
Reference
Basic Information
Displays the basic information (name, ID, tag, description, and auto stop), environment information (image, JupyterLab version, VPC, subnet, and security group), resource information (resource pool, instance specifications, node affinity scheduling, storage type, and storage capacity), and remote SSH information of the notebook instance.
Storage Settings
Displays the dynamic storage and extended storage information of the notebook instance. You can also add or unmount storage as required.
- Dynamic storage: Supports dynamic storage mounting while the instance is running without requiring a restart. Storage is automatically remounted upon startup, and data is persisted. This option is suitable for scenarios requiring flexible mounting or temporary storage expansion during runtime.
- Extended storage: Based on a cloud-native persistent storage solution, extended storage provides stable and reliable storage management. However, stopping the instance is required to mount or change storage configurations. This option is suitable for pre-planned, long-term data volumes.
Data Service
This tab is only displayed for notebook instances in a dedicated resource pool. Displays the supported data services, resource names, and statuses.
Click Status Sync to synchronize the status of data services.
-
Event
Displays the event information of the notebook instance, including the event name, event level, event information, and first occurrence time.
Monitor
Displays the metrics of the notebook instance, including the CPU usage, physical memory usage, GPU usage, GPU memory usage, and disk write.
The operations in the upper right corner of the notebook instance details page are similar to those on the notebook page. For details, see Table 1.
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.
- Online use of notebook instances through Code Server. For details, see Using Code Server for Code Development.
- 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. In the Basic Information tab of 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 3. 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. |
FAQs
- 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 for a Notebook Instance.
- 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 Notebook Storage Mount Methods.
- 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