Deep Learning Containers (DLC), Data Science Workshop (DSW), and Elastic Algorithm Service (EAS) on Platform for AI (PAI) can mount a Storage NAS (NAS) or Cloud Parallel File Storage (CPFS) file system to a container path for storing training and deployment files, and result files.
This topic uses a General-purpose NAS file system as an example.
Prerequisites
Before you begin, make sure you have:
A General-purpose NAS file system. See Create a file system.
Step 1: Create a NAS dataset
Skip this step if you are using EAS. EAS mounts NAS directly without a dataset object. For DLC and DSW, skip this step only if you plan to use the Directly mount option instead of a dataset.
Create a NAS dataset in PAI so that DLC and DSW can reference the file system by name. For details, see Create and manage datasets.
Create the dataset in the same region as your DLC jobs, DSW instances, and EAS services, and where the data and code are stored.
Set the following parameters when creating the dataset:
| Parameter | Value |
|---|---|
| Storage type | General-purpose NAS |
| File system | The ID of your NAS file system. Log on to the NAS console to find the ID, or select it from the drop-down list. |
| File system path | / |
| Default mount path | /mnt/data/ |
Step 2: Mount NAS in DLC, DSW, or EAS
After you create the dataset, attach it when creating a DLC training job, a DSW instance, or an EAS service.
Mount NAS in DLC
When creating a training job, configure storage in the Environment Information section. Two options are available:

Option 1: Custom dataset (recommended)
Click Custom Dataset and select your General-purpose NAS dataset.
The mount path configured in the dataset is applied automatically. The training job reads from this path at runtime.
Toggle Read-only to control read/write access.
Option 2: Directly mount
Click General-purpose NAS and configure the file system parameters.
Set Mount Path to the path inside the DLC container where you want to access the data.
Toggle Read-only to control read/write access.
Improve throughput with nconnect (optional)
For data-intensive training jobs, you can increase NAS read throughput by setting the nconnect parameter in Advanced Settings. This parameter opens multiple TCP connections between the NFS client and the server, which raises throughput when a single connection is saturated.
We recommend that you set nconnect to 4:
{"nconnect":"4"}Mount NAS in DSW
When creating a DSW instance, configure storage in the Dataset mounting section:

Custom dataset: Click
, go to the General-purpose NAS tab, and select the NAS dataset. The mount path configured in the dataset is applied automatically. Access the file system from that path in the DSW development environment.Working directory: Select the dataset from the drop-down list. The dataset is synchronized to the
/mnt/workspacedirectory of DSW.
Mount NAS in EAS
When deploying an EAS service, configure storage in the Environment Information section:

Under Model Settings, click Standard NAS and configure the following parameters:
| Parameter | Description |
|---|---|
| Select a file system | The NAS file system to mount. |
| Mount Target | The mount target through which EAS accesses the file system. |
| File system path | The path within the NAS file system to expose to the service. |
| Mount path | The path inside the service container where the NAS data is accessible. |