1

data_dir我在没有 root 权限的高性能集群上有一个私有组项目文件夹(我们称之为)。该文件夹位于单独的分区中。
我有一个需要访问的奇点容器data_dir。官方文档说 -Bflag 是绑定路径,但我无法使用-B. 这是我到目前为止所尝试的:

XXXXXX  login1[~/work/subcam] master ⦿ ➜  readlink data
/gpfs/projects/oceanvideo/data
XXXXXX  login1[~/work/subcam] master ⦿ ➜  singularity run -B $(readlink data):$(pwd)/data container.sif
WARNING: skipping mount of /local_scratch: no such file or directory

________                               _______________
___  __/__________________________________  ____/__  /________      __
__  /  _  _ \_  __ \_  ___/  __ \_  ___/_  /_   __  /_  __ \_ | /| / /
_  /   /  __/  / / /(__  )/ /_/ /  /   _  __/   _  / / /_/ /_ |/ |/ /
/_/    \___//_/ /_//____/ \____//_/    /_/      /_/  \____/____/|__/


You are running this container as user with ID 21530 and group 21500,
which should map to the ID and group for your user on the Docker host. Great!

tf-docker ~/work/subcam > cd data
bash: cd: data: No such file or directory
tf-docker ~/work/subcam > cd /gpfs/
tf-docker /gpfs > ls
work
tf-docker /gpfs > cd projects
bash: cd: projects: No such file or directory

如何data_dir使用容器访问?

4

1 回答 1

2

-B是在容器中挂载目录的正确方法。几个选项:

  1. 如果/gpfs/projects/oceanvideo/data它本身是一个符号链接,它不会在容器内解析并给出错误代码。readlink只会解决一个级别。找到原始的非链接路径并将其与-B.
  2. 如果不是这种情况,请运行 withsingularity -vv run ...以查看是否有更多关于目录未挂载原因的信息。
  3. 确保集群允许用户绑定
于 2019-07-08T08:50:01.597 回答