Quick start: Data Science Workshop (DSW)

更新时间:
复制 MD 格式

Apsara File Storage NAS integrates with Platform for AI (PAI), letting you use a NAS file system to store data persistently during model training and deployment. This topic describes how to mount a NAS file system on a DSW instance in the console.

Prerequisites

Step 1: Create a file system

If you already have a file system, skip this step.

  1. Log on to the NAS console.

  2. In the File System Selection Guide section of the Overview page, click Create below General-purpose NAS.

  3. On the Create panel, configure the following parameters.

    Parameter

    Description

    Region

    The file system and the service to which it is mounted must be in the same region. This tutorial uses the China (Hangzhou) region as an example.

    Zone

    Select the zone of your vSwitch to avoid cross-zone latency. This tutorial uses Hangzhou Zone F as an example.

    Storage Class

    Advanced

    Protocol Type

    NFS

    Recycle Bin

    We recommend that you enable this feature. The recycle bin temporarily stores deleted files and directories, preventing accidental data loss.

    Lifecycle Management

    Configure this feature based on your business needs. We recommend that you keep this feature disabled.

    Encryption Type

    Not Encrypted.

    Data Backup

    Disabled.

    Network Type

    VPC.

    VPC

    Select your existing VPC from the drop-down list.

    vSwitch

    Select a vSwitch that is created in the VPC.

  4. Click Buy Now and follow the on-screen instructions to complete the purchase.

Step 2: Create a DSW instance

Create a DSW instance with public resources and configure a NAS file system as a dataset.

  1. Log on to the PAI console.

  2. On the Overview page, select the target region.

  3. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace to manage.

  4. On the Workspace Details page, choose Data Science Workshop (DSW) in the left-side navigation pane.

  5. On the Data Science Workshop (DSW) page, on the Instance tab, click Create Instance.

  6. On the Create Instance page, configure the following key parameters, and leave the others at their default values. For more information, see Create a DSW instance.

    Parameter

    Description

    Instance Name

    Enter a custom instance name. This tutorial uses test_01 as an example.

    Resource Type

    Select Public Resources in pay-as-you-go mode.

    Instance Type

    Select GPU. The instance type is ecs.gn7i-c8g1.2xlarge.

    Image config

    Select an Alibaba Cloud Image such as stable-diffusion-webui-develop:1.0-pytorch2.0-gpu-py310-cu117-ubuntu22.04.

    Storage Path Mounting

    Click General-purpose NAS and configure the following parameters. Leave other parameters at their default values. For more information about datasets, see Create and manage datasets.

    • File System: Select the NAS file system that you created in the previous step.

    • Mount Target: Select a mount target for the file system.

    • File System Path: /

    • Mount Path: /mnt/data/

    Network Information

    Security Group: Select an existing security group from the drop-down list.

    Visibility

    Select Visible to the Instance Owner

  7. Click Yes.

    The DSW instance takes about 10 minutes to create. After the instance is created, its status changes to Running.

Step 3: Verify the mount

  1. Return to the DSW page. Find the instance you created and click Open in the Actions column.

  2. In the top menu bar of the DSW instance page, click the Terminal tab. Then follow the on-screen instructions to open a terminal.

  3. In the Terminal, run the following command to check whether the NAS dataset is mounted:

    mount | grep nas

    If the dataset is mounted, the command returns output similar to the following:

    # mount | grep nas
    0fdxxx3-1xxx1.cn-shanghai.nas.aliyuncs.com:/ on /mnt/data type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,nolock,noresvport,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=172.16.0.97,mountvers=3,mountport=2049,mountproto=tcp,local_lock=all,addr=172.16.0.97)
    #

    In the output, /mnt/data is the mount path that you specified when you created the DSW instance. Your data and code are stored persistently as long as the NAS file system and service are running.

Related documentation