2

我有一个为我制作的奇异容器(在彗星 GPU 节点上运行 tensorflow),但我需要修改 keras 安装以达到我的目的。

我了解.simg文件不可编辑(并且.img不推荐使用可写格式),因此不鼓励转换为.img文件、编辑然后转换回文件的过程:.simg

sudo singularity build --writable development.img production.simg
## make changes
sudo singularity build production2.img development.simg

在我看来,最好的方法可能是提取内容(比如放入沙箱),编辑它们,然后将沙箱重建为.simg图像。

我知道如何进行第二次转换 ( singularity build new-sif sandbox),但我该如何进行第一次转换?

我尝试了以下方法,但命令永远不会完成:

sudo singularity build tf_gpu tensorflow-gpu.simg
WARNING: Authentication token file not found : Only pulls of public images will succeed
Build target already exists. Do you want to overwrite? [N/y] y
2018/10/12 08:39:54 bufio.Scanner: token too long
INFO:    Starting build...
4

1 回答 1

1

您可以使用以下命令轻松地在沙盒和生产构建之间进行转换:

sudo singularity build lolcow.sif docker://godlovedc/lolcow  # pulls and builds an example container

sudo singularity build --sandbox lolcow_sandbox/ lolcow.sif # converts from container to a writable sandbox

sudo singularity build lolcow2 lolcow_sandbox/ # converts from sandbox to container

因此,您可以编辑沙箱,然后相应地重建。

于 2020-03-19T21:03:43.500 回答