microsoft / openpaivscode

Extension to connect OpenPAI clusters, submit AI jobs, simulate jobs locally, manage files, and so on.
MIT License
14 stars 6 forks source link

Mount NFS failed #25

Open folliefollie721 opened 4 years ago

folliefollie721 commented 4 years ago

OS : ubuntu 18.04 Extension : v0.3.2

image

When I double clicked the mount point /mnt/home, I got this error Mount NFS failed: Unsupport OS. Is it the system problem or some configure files needed to be added?

yiyione commented 4 years ago

Hi @folliefollie721 , looks like it's a bug in Openpai VSCode Client, we only config the mount command for win32 and darwin. But there's a way to work around:

  1. Open the cluster webportal, go to your user profile page and read the NFS storage address.
  2. Mount the storage in terminal e.g.:
$ sudo apt-get update && apt-get install -y nfs-common
$ sudo mkdir -p /mnt/nfsData
$ sudo mount <NFS storage address>:/data /mnt/nfsData
  1. Update you VSCode settings (.vscode/settings.json in your workspace): If you mount the NFS to the address you set before (In config NFS mount point step), you can skip this.
{
    "pai.storage.nfs.mountPoint": {
        "<PAI cluster name>~<storage name>": "/mnt/nfsData"
    }
}
  1. Refresh the STORAGE EXPLORER or double click the Double click to mount NFS line.

vscode-mount

folliefollie721 commented 4 years ago

@yiyione Thank you for your reply! I mounted NFS in terminal, and my VSCode settings are as follows: image

I got this file list in storage explorer: image

But I failed uploading files to the storage. image

yiyione commented 4 years ago

@folliefollie721, looks like the OpenPAI VSCode Client don't have write permission to /mnt/nfsData path. You can try to open the vscode using sudo, e.g.

sudo code ~/hello_world/

If still got this error, you can just copy your files to path mnt/nfsData/<path you want to upload> manually (That's what the vscode client trying to do), e.g.

cp hello_world.py /mnt/nfsData/<path you want to upload>

And we'll try to fix these issues in next release, thank you for your feedback.