Google 云中的 Slurm 集群:controller/login 节点中挂载目录中的数据在计算节点中不可用

Slurm cluster in Google cloud: Data in mounted directory in controller/login node not available in compute nodes

我在 this tutorial. I have also created a data bucket that stores some data that needs to be accessed in the compute nodes. Since the compute nodes share the home directory of the login node, I mounted the bucket in my login node using gcsfuse 之后创建了一个 slurm 集群。但是,如果我执行一个简单的脚本 test.py 来打印挂载目录的内容,它就是空的。该文件夹以及 python 文件都在那里。

我是否必须在 yaml 配置文件中指定某些内容才能访问挂载目录?

我已经写下了挂载目录的步骤:

使用

创建 Slurm 集群时
gcloud deployment-manager deployments create google1 --config slurm-cluster.yaml

应该挂载存储目录的节点有足够的权限很重要。 Ucnomment/add 如果您的登录节点应该挂载数据,请在 slurm-cluster.yaml 文件中添加以下内容。 (如果您愿意,只需对控制器节点执行相同的操作)。

login_node_scopes          :
     - https://www.googleapis.com/auth/devstorage.read_write

接下来,登录登录节点并安装gcsfuse。安装 gcsfuse 后,您可以使用以下命令挂载存储桶

gcsfuse --implicit-dirs <BUCKET-NAME> target/folder/

请注意,附加到您的 VM 的服务帐户必须具有存储桶的访问权限。您可以在云控制台中的 VM 详细信息中找到服务帐户的名称,或者通过 运行 在 VM 上执行以下命令:

gcloud auth list

我刚刚进行了类似的设置。对于你的为什么不是,我没有明确的答案,但有几点说明:

  • gcsfuse 默认安装,无需显式安装。
  • 您需要等待 Slurm 安装完全完成才能使用存储桶。
  • 似乎需要“devstorage.read_write”。
  • 我在yaml文件的login_machine_type下有如下内容:
network_storage        :
- server_ip: none
  remote_mount: mybucket
  local_mount: /data
  fs_type: gcsfuse
  mount_options: file_mode=664,dir_mode=775,allow_other