如何在GCP AI平台Jupyter笔记本中挂载Cloud Filestore?

How to mount Cloud Filestore in GCP AI platform Jupyter notebook?

我想在 GCP AI Platform Jupyter notebook 实例中装载 Cloud Filestore 实例,这样我就不必将所有数据上传到 notebook 中。

我按照 https://cloud.google.com/filestore/docs/mounting-fileshares 中的说明进行操作,但收到以下错误消息:

root@0084329abd1b:/home# mount <IP_ADDRESS>:/streams cfs
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
root@0084329abd1b:/home# mount -o nolock <IP_ADDRESS>:/streams cfs
mount.nfs: Operation not permitted
  1. 创建一个 Filestore 实例 link

  2. 创建一个 Google 虚拟机实例 link

  3. 创建笔记本AI实例link

  4. 在 VM 实例上 运行 命令:

    sudo apt-get -y update
    sudo apt-get -y install nfs-common
    sudo mkdir test
    # fileshare remote target
    sudo mount 111.11.111.11:/fileshare test
    sudo chmod go+rw test
    echo 'This is a test' > test/testfile
    ls test 
    #testfile
    
  5. 在 Notebook AI 实例上 运行 命令 link:

    sudo apt-get -y update
    sudo apt-get -y install nfs-common
    sudo mkdir test
    # fileshare remote target
    sudo mount 111.11.111.11:/fileshare /test
    ls test
    #testfile
    

您还可以查看 link

在您的终端上,您可以执行类似的操作。

mkdir des_bucket
gcsfuse --debug_gcs --implicit-dirs  src_bucket des_bucket