我在不具有root特权的高性能群集上有一个私有组项目文件夹(我们叫它query_job.query
)。该文件夹位于单独的分区中。
我有一个用于访问data_dir
的奇异容器。正式的documentation says data_dir
标志是绑定路径,但是我无法使用-B
访问容器内的文件夹。这是我到目前为止尝试过的:
-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
?
答案 0 :(得分:1)
-B
是在容器中装载目录的正确方法。一些选择:
/gpfs/projects/oceanvideo/data
本身是一个符号链接,它将不会在容器内部解析并给出该错误代码。 readlink
将仅解决单个级别。找到原始的非链接路径,并将其与-B
一起使用。singularity -vv run ...
运行,以查看是否有更多有关为何不装载目录的信息。