GCP AI笔记本实际使用什么docker映像?无法从深度学习映像挂载Cloud Filestore

时间:2019-12-13 19:30:38

标签: google-cloud-platform jupyter-notebook google-cloud-ml gcp-ai-platform-notebook google-cloud-filestore

我想使用自定义容器启动AI Platform Notebook实例,以便添加一些依赖关系(例如Python 3.7)。但是,当我运行自定义容器时,无法从Cloud Filestore挂载数据。

对于每个the docs,我使用此深度学习图像创建了一个自定义容器:

  

gcr.io/deeplearning-platform-release/tf-cpu

我还没有制作自己的容器,并且添加了零个自定义项;我只是将gcr.io/deeplearning-platform-release/tf-cpu插入自定义实例的控制台。

当我尝试安装云文件存储时,出现以下错误:

root@c7a60444b0fc:/# 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@c7a60444b0fc:/# mount -o nolock <IP_ADDRESS>:/streams cfs
mount.nfs: Operation not permitted

现在,当我从控制台启动TensorFlow 1.15笔记本电脑(无自定义功能)时,安装工作正常,环境与我从深度学习映像获得的环境有所不同。特别是,深度学习映像以root用户身份启动,而TF 1.15实例以jupyter用户身份启动。

那么GCP AI笔记本实际使用什么图像?深度学习映像必须能够进行哪些其他自定义才能挂载Cloud Filestore?

1 个答案:

答案 0 :(得分:0)

AI Platform Notebooks环境由您在创建实例时选择的容器映像提供。在此页面中,您将看到可用的container image types

您面临的问题是known issue,并且在未初始化rpc-statd.service时会发生。我已经按照以下步骤解决了它:

  • 创建文件存储实例
  • 使用Python创建一个AI Platform Notebooks实例 与Filestore实例在同一VPC中的环境
  • 进入root模式,安装了nfs-common并启用了rpc-statd.service:

    sudo bash
    sudo apt install nfs-common
    systemctl enable rpcstatd.service
    

使用上述命令并遵循these steps,我可以正确地安装和访问Filestore NFS。

如果您要进一步自定义自定义容器,则应考虑到要访问Cloud Filestore,您必须使用VPN连接到与Filestore实例相同的网络,如{ {3}},否则在调用Filestore的实例内部IP时会发现“连接超时”错误。您可以使用this SO post来这样做。