Use NAS or CPFS

更新时间:
复制 MD 格式

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:

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.

Important

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:

ParameterValue
Storage typeGeneral-purpose NAS
File systemThe 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:

DLC NAS mount configuration

Option 1: Custom dataset (recommended)

  1. Click Custom Dataset and select your General-purpose NAS dataset.

  2. The mount path configured in the dataset is applied automatically. The training job reads from this path at runtime.

  3. Toggle Read-only to control read/write access.

Option 2: Directly mount

  1. Click General-purpose NAS and configure the file system parameters.

  2. Set Mount Path to the path inside the DLC container where you want to access the data.

  3. 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:

DSW NAS mount configuration
  • Custom dataset: Click image, 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/workspace directory of DSW.

Mount NAS in EAS

When deploying an EAS service, configure storage in the Environment Information section:

EAS NAS mount configuration

Under Model Settings, click Standard NAS and configure the following parameters:

ParameterDescription
Select a file systemThe NAS file system to mount.
Mount TargetThe mount target through which EAS accesses the file system.
File system pathThe path within the NAS file system to expose to the service.
Mount pathThe path inside the service container where the NAS data is accessible.