This topic describes how to upload files to Data Science Workshop (DSW) and download files from DSW.

Background information

Each DSW instance is provided with 5 GB of storage space by default. You can also mount Network Attached Storage (NAS) file systems to DSW instances if you require large storage. For more information, see Expand the storage of an instance. We recommend that you purchase NAS file systems to store large files. This facilitates file downloading.

Upload small files

We recommend that you upload files that are smaller than 300 MB from the Data Science Workshop page.

  1. In the toolbar of the Data Science Workshop page, click the Upload icon.
  2. Select a file and follow the instructions to upload the file.

Download small files

We recommend that you download files that are smaller than 300 MB from the Data Science Workshop page.

  1. In the file list of the Data Science Workshop page, find the file that you want to download and right-click the file.
  2. In the shortcut menu that appears, click Download.

Upload large files

We recommend that you mount a NAS file system to your DSW instance and upload files that are larger than 300 MB to the NAS file system.

  1. Verify the type of the NAS file system.
    1. Log on to the Apsara File Storage NAS console.
    2. In the left-side navigation pane, choose File System > File System List.
    3. In the upper-left corner of the page, select the region where the NAS file system is deployed.
    4. On the File System List page, check the Storage Specifications and Protocol Type of the NAS file system.
      DSW supports only Capacity and Performance NAS file systems. The protocol type of the file systems must be Network File System (NFS).
  2. Log on to an Elastic Compute Service (ECS) instance.
    1. Create an ECS instance. For more information, see Create an instance by using the provided wizard.
      When you create an ECS instance, set the following parameters. For other parameters, use the default settings.
      • Image: Select CentOS and a version.
      • Network Type: Select an existing Virtual Private Cloud (VPC) network, or go to the VPC console to create a new VPC network.
    2. Reset the password of the ECS instance. For more information, see Reset the logon password of an instance.
    3. Restart the ECS instance. For more information, see Reboot the instance.
    4. Connect to the ECS instance. For more information, see Connect to a Linux instance by using Workbench.
  3. Create a mount target for the NAS file system. For more information, see Manage mount targets.
    Set Mount Target Type to VPC. From the VPC Network list, select the VPC network where the ECS instance is deployed.
    Note Make sure that you choose the VPC network where the ECS instance is deployed. You can check the VPC network of the ECS instance on the details page of the ECS instance.
    After you add a mount target, click the NAS file system. On the page that appears, click the Mounting Use tab to view the mount command. For more information, see Manage file systems. Run the mount command to mount the NAS file system to the ECS instance.
  4. Mount the NAS file system to the ECS instance.
    1. Install the nfs-utils package to the ECS instance.
      Install the nfs-utils package.
      yum install nfs-utils
    2. Run the mount command. You can view the mount command on the Mounting Use tab. Then, check whether the NAS file system is mounted to the ECS instance.
      sudo mount -t nfs -o vers=4.0,noresvport 31ce14ad85-jol17.cn-shanghai.nas.aliyuncs.com:/ /mnt
      Check whether the NAS file system is mounted to the ECS instance.
      mount -l
  5. Upload a file.
    Connect to the ECS instance by running the SFTP command or using the FileZilla tool, and upload a file to the /mnt root directory. On the Instances page, you can view the public IP address of the ECS instance. For more information, see View instance information.
  6. Optional:View the uploaded file.
    1. Log on to the ECS instance and make sure that the file is uploaded to the /mnt directory.
      View the uploaded file
    2. Navigate to the Data Science Workshop page. Run the df -h command in Terminal to locate the NAS file system that is mounted to the DSW instance. Then, you can view the uploaded file.View the NAS file system

Download large files

We recommend that you run the SFTP command to download files that are larger than 300 MB. However, you can use this method to download only files that are stored in a mounted NAS file system. If the file to be downloaded is stored in the default NAS file system (5 GB), you must first copy the file to the NAS file system that is manually mounted to the DSW instance. Navigate to the Data Science Workshop page. Move the file that you want to download to the /nas directory in Terminal. Then, you can run the SFTP command or use the FileZilla tool to download the file from the ECS instance. For more information about how to run the SFTP command to upload files to or download files from NAS file systems, see Upload data to and download data from an NFS file system.