Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 奇点中的绑定文件_Image_Mount_Singularity Container - Fatal编程技术网

Image 奇点中的绑定文件

Image 奇点中的绑定文件,image,mount,singularity-container,Image,Mount,Singularity Container,我用脚本创建了一个奇点图像。我需要使用带有脚本参数的本地文件运行我的应用程序。为此,我希望使用--bind参数。如果我尝试执行以下操作,效果会非常好: singularity run --bind /my/source/file:/destination/file my_app_image.img <input.txt >output.txt singularity run--bind/my/source/file:/destination/file my\u app\u imag

我用脚本创建了一个奇点图像。我需要使用带有脚本参数的本地文件运行我的应用程序。为此,我希望使用--bind参数。如果我尝试执行以下操作,效果会非常好:

singularity run --bind /my/source/file:/destination/file my_app_image.img <input.txt >output.txt
singularity run--bind/my/source/file:/destination/file my\u app\u image.img output.txt
但我想直接这样运行它:

./my_app_image.img --bind /my/source/file:/destination/file <input.txt >output.txt
/my\u app\u image.img--bind/my/source/file:/destination/file output.txt

但这不起作用-文件未装入目标中。如何在运行时装载文件?

虽然我使用singularity容器工作了一段时间,但我不知道这是否可行

如果必须在用例中调用可执行文件,可以编写一个简短的包装器脚本,调用
singularity run…
并将文件绑定到容器中

你也可以在网上提问


另外,我想发表评论,但声誉不够。

您可以在调用容器之前将绑定目录/文件导出为可执行文件

 export SINGULARITY_BINDPATH="/my/source/file:/destination/file"
 ./my_app_image.img <input.txt >output.txt
export SINGULARITY\u BINDPATH=“/my/source/file:/destination/file”
./my_app_image.img output.txt