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 the ModelArts API. For details, see Creating a Notebook Instance.
Constraints
- When creating a notebook notebook, the auto-stop feature is enabled by default. This automatically stops the notebook instance after a specified period to prevent resource waste.
- 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 Data Disk Type is set to EVS).
- Notebook instances do not support opening ports to provide 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.
Notes
Notebook serves as a debugging and testing environment. Although it provides public network downloading capabilities, the public network proxy it uses is a shared proxy. Therefore, do not download large files in notebook instances, especially those exceeding 10 GB. Furthermore, the public network access bandwidth provided by notebook instances is limited, which only guarantees network connectivity and does not guarantee download speeds.
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 as the data disk type when creating a notebook instance, the EVS disk will be billed as long as the notebook instance is not deleted. You are advised to stop and delete the notebook instance in a timely manner to avoid unnecessary fees. For details, see Development Environment.
Procedure
- Log in to the ModelArts console. In the navigation pane, choose Permissions Management. On the agency list page, check if an agency is configured. If not, configure one first. For details, see Configuring Agency Authorization for ModelArts with One Click. Figure 1 Viewing agency information
- Log in to the ModelArts console and perform the following operations as required:
- New version: Choose Model Build > Notebook.
- Old version: Choose Development Space > Notebook.
- Click Create Notebook in the upper right corner. On the page that appears, configure the parameters by referring to the following table.
- Basic Information
Parameter
Description
Name
The name of the notebook instance. The system automatically generates a default name, which you can modify based on your needs. Naming rules: The name can only contain digits, letters, underscores (_), and hyphens (-). The length cannot exceed 128 characters and cannot be empty.
Description
Custom description of the notebook instance. The description can contain a maximum of 512 characters.
Tags
Tags used to identify and organize multiple cloud resources. If you need to use the same tag across all services, create a predefined tag in TMS and select it from the dropdown list. For details, see Creating Predefined Tags.
Click Add Tag and enter or select the tag key and 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:Both TMS predefined tags (selected from the dropdown list) and custom tags (entered manually) are supported. Predefined tags are visible to all service resources that support tagging, while tenant-defined custom tags are visible only within their respective service.
- Auto Stop
Parameter
Description
Auto Stop
A feature that automatically stops the notebook instance to prevent unnecessary resource consumption. It 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.
- Resource
Parameter
Description
Resource
Resource Pool Type
The type of compute resource pool, which can be public resource pool or dedicated resource pool. 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 pool you purchased is a single-node Tnt004 pool whose flavor is GPU: 1*tnt004 | CPU: 8 vCPUs 32GiB (modelarts.vm.gpu._tnt004u8), when you use the cluster to create a notebook instance, Tnt004 is idle but is displayed as sold out or the creation fails due to insufficient resources, contact technical support.
Instance Specifications
The hardware specification of the compute instances. The system selects a default specification automatically, which you can modify based on your requirements.
Specifications
The type of instance specifications, supporting both preset specifications and custom specifications.
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 only available when Resource Pool Type is set to Dedicated resource pool.
Use node affinity to ensure pods are scheduled to nodes meeting specific conditions, enabling 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 Affinity-based Scheduling Policy dialog box, 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. At least one available node must be reserved. Otherwise, the scheduling policy cannot be executed.
- Environment
Parameter
Description
Select Image
The AI engine used for the notebook instance, which can be a preset image or a custom image. You can click
, select your target image, and click OK.- Preset images: built-in AI engines provided natively within ModelArts.
- Custom images: User-created images. You can create a custom image using either of the following methods:
- 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
The development environment, supporting either JupyterLab or Code Server. 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.
Select container running user ID
This parameter is only available when Resource Pool Type is set to Dedicated resource pool.
CAUTION:- After a notebook instance is created, the startup user and user group cannot be changed.
- If you start a notebook instance as the root user and save the image, and then use this image to create a new instance as ma-user, ma-user might not be able to access files created by the root user because of file permission restrictions.
When starting a notebook instance, ModelArts supports the following two container 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.
- Storage Settings
Parameter
Description
System Disk
By default, a 50 GB local disk is provided for free as the system disk to store the OS and runtime environment. After the instance is deleted, the system disk will be released. Back up necessary data in advance.
Data Disk Type
The type of storage used for data retention. 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 data disk mount path is used as the working directory. 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.
- Scalable File Service Turbo (SFS Turbo)
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 data disk mount path is used as the working 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.
- Object Storage Service – Bucket or Object Storage Service – Parallel File System
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.Note: The data disk mount path is used as the working directory. The content in this directory is retained after the instance is stopped. File operations such as adding, deleting, and modifying files in this directory during instance running are synchronized to the cloud storage system.
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
Additional storage allocations that can be added dynamically based on your requirements. You can click Add Extended Storage to add up to 30 extension storage volumes, or remove unneeded ones.
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 Extended 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
The security credentials containing the user's AK/SK. 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. For details, see Creating a Secret.
- Elastic Volume Service
- Access Configuration
Parameter
Description
Remote SSH
A feature that enables remote logins to the notebook instance from a local IDE via VS Code. This feature has specific usage constraints and maximum connection limits. Before using this feature, view the SSH Constraints to prevent notebook instance response timeout or interruption, which affects normal use. For details about how to remotely use a notebook instance through SSH, see Using a Notebook Instance Remotely with SSH.
When a notebook instance is stopped, you can update the SSH configuration on the instance details page. For details, see Enabling Remote SSH.
The notebook instances with remote SSH enabled have VS Code plugins (such as Python and Jupyter) and the VS Code server package pre-installed, which occupy about 1 GB persistent storage space.
Key Pair
The authentication credential required when 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. For details, see Creating a 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 Settings
You cannot change the network settings of a notebook instance after creation. Do not delete the VPC, subnet, or security group associated with the instance. If you do, the instance will not start.
Parameter
Description
Network Type
Network type, which can be public network or dedicated network.
- Public Network: Uses the platform's shared network, cannot access services within a VPC, and may experience bandwidth limitations during peak traffic periods.
- Dedicated Network: Supports access to a dedicated VPC and public network, allows binding security groups, and enables mutual access between cloud services within the same VPC.
Before using this feature, 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. For details, see Creating a VPC with a Subnet.
- 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. For details, see Creating a Security Group.
NOTE:Network modes support fine-grained permission configuration. If not configured, all network modes (shared/exclusive/forbidden) are supported by default. This applies only to the following operations:
- modelarts:notebook:create
- modelarts:notebook:updateNotebook
If you need to restrict access permissions for network modes, configure a custom policy using the following steps: Create a custom policy in IAM, select Visual editor for Policy View, select modelarts:notebook:create or modelarts:notebook:updateNotebook for Actions, and add a condition under (Optional) Add request condition. Select modelarts:NetworkAccessMode for Condition Key, and enter the value based on your requirements. For details, see Creating a Custom Policy for ModelArts.
- shared: shared network
- exclusive: dedicated network
- forbidden: disabled network
Each condition value only affects its corresponding network mode and does not impact other modes. For example, if shared is configured to be denied, only requests for the shared network mode will be intercepted, while the dedicated network (exclusive) and disabled network (forbidden) modes remain unaffected.
Network mode configurations take effect independently per API action. To apply restrictions to both creation and update scenarios, you must add the configuration to both modelarts:notebook:create and modelarts:notebook:updateNotebook actions.Figure 3 Creating a custom policy
Allow instance access to the Internet
When enabled, notebook instances can freely send requests to or receive traffic from the Internet.
The access method can be public gateway or dedicated gateway.
- Public gateway: Shares public network bandwidth; download speeds may be slower during high user concurrency.
- Dedicated gateway: You provide your own public network capabilities with dedicated bandwidth. Before using a dedicated gateway, configure fine-grained NAT access authorization. For details, see Creating an IAM User and Granting ModelArts Permissions. If you have the NAT Administrator permission, you do not need to set this parameter.
- Public NAT gateway: Component enabling multiple cloud servers to share an elastic IP (EIP) to access the Internet or provide internet services. The selected VPC and subnet during purchase must match those configured in the notebook dedicated network. Figure 4 Buying a public NAT gateway – configuring a VPC and subnet
Figure 5 Creating a notebook instance – configuring a VPC and subnet
For details about public NAT gateways, see Overview of Public NAT Gateways. For details about how to buy a public NAT gateway, see Buying a Public NAT Gateway.
- EIP: EIP enables your cloud resources to communicate with the Internet using static public IP addresses and scalable bandwidth. A resource with an EIP can access the Internet directly. A resource with only a private IP address cannot. EIPs cannot be shared by other services or NAT.
For details about EIPs, see What Is Elastic IP? For details about how to create an EIP, see Elastic IP User Guide.
- Public NAT gateway: Component enabling multiple cloud servers to share an elastic IP (EIP) to access the Internet or provide internet services. The selected VPC and subnet during purchase must match those configured in the notebook dedicated network.
- 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.
Figure 6 Notebook instance started
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. You can change the image only when the notebook instance is in the Stopped or Start Failed state.
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 version: Choose Model Build > Notebook.
- Old version: Choose Development Space > Notebook.
- In the notebook instance list, click the name of the target instance. Figure 7 Notebook instance details
Table 2 Notebook instance details Tab
Description
Reference
Basic Information
Displays the basic information (name, ID, tag, description, and auto stop), resource configuration (resource pool and instance specifications), environment configuration (image and WebIDE), storage configuration (system disk and data disk types), access configuration, and network configuration of the notebook instance.
Expansion Storage
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 use of notebook instances through Code Server. For details, see Using Code Server for Code Development.
- 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.
When you create or start a notebook instance, it automatically generates configuration files and scripts in the $WORK_DIR/.modelarts directory. For details about .modelarts, see Why Is the .modelarts Directory Automatically Generated in a Notebook Instance?
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 9 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
For more information about notebook, see Notebook 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.
What is your overall rating for this page?
Thank 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