You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first run of Singularity inside Docker (as root in the container) with --privileged will fail with a loop device error:
$ docker run --privileged singularity:main --debug run docker://alpine
...
FATAL [U=0,P=1] Master() container creation failed: mount /proc/self/fd/3->/usr/local/var/singularity/mnt/session/rootfs error: while mounting image /proc/self/fd/3: failed to find loop device: could not attach image file to loop device: no loop devices available
The second run will complete without issue.
By examining /dev and --debug logs, it is apparent that during the first run, LOOP_CTL_ADD is called 256 times, creating /dev/loop0 -> /dev/loop255 on the host. The created loop devices are not visible in the container, however:
DEBUG [U=0,P=136] addLoopDev() LOOP_CTL_ADD for loop device 251
DEBUG [U=0,P=136] addLoopDev() Expected loop device 251 is not visible. Creating with mknod
DEBUG [U=0,P=136] attachLoop() couldn't open loop device 251: stat /dev/loop251: no such file or directory
A workaround is to bind in /dev to the Docker container with -v /dev:/dev so that the loop devices created are accessible. Alternatively they can be created on the host first. These approaches need documenting.
It would be nice to have a fall-back to using FUSE, if possible, though.
The first run of Singularity inside Docker (as root in the container) with
--privileged
will fail with a loop device error:The second run will complete without issue.
By examining
/dev
and--debug
logs, it is apparent that during the first run,LOOP_CTL_ADD
is called 256 times, creating/dev/loop0
->/dev/loop255
on the host. The created loop devices are not visible in the container, however:This thread may be relevant:
https://forums.docker.com/t/can-only-create-one-loop-mount-inside-of-container/109498/6
The text was updated successfully, but these errors were encountered: