0

我将不胜感激您的建议并就以下问题提出建议:

我正在使用 SLURM 集群,我的同事建议在集群上运行奇异容器,并将奇异容器的输出重定向到每个计算节点的 /scratch 文件夹中托管的文件夹。

例如 :

singularity exec --bind /local/scratch/bt:/output \
singularity_latest.sif run  \
-o /output

请问:如何访问计算节点“scratch”中的“output”文件夹?非常感谢 !

波格丹

4

1 回答 1

0

你可以把它想象--bind成一个符号链接。在主机操作系统上运行ls /local/scratch/bt相当于ls /output在 exec 进程内部运行。

mkdir scratch
touch scratch/file1

ls -l scratch
# total 0
# -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1

singularity exec -B $PWD/scratch:/output my_image.sif ls -l /output
# total 0
# -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1

# singularity also accepts relative paths
singularity exec -B scratch:/output my_image.sif touch /output/file2

ls -l scratch
# total 0
# -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:13 file1
# -rw-rw-r-- 1 tsnowlan tsnowlan 0 Jun  8 09:16 file2

于 2021-06-08T07:17:24.007 回答