Can Singularity hub build a writable image ?

71 views
Skip to first unread message

Samy

unread,
Apr 12, 2018, 2:36:39 PM4/12/18
to singularity
Hello Singularity community.

I'm using Singularity hub to build my containers. However, the containers are not writable and the user can't fully use it without that. Is there anyway to make them writable?

For now, that is what we do: 

 sudo singularity build --writable newImage.img imageFromShub.simg
 singularity shell --writable newImage.img

But depends the environment i'm in, I sometimes get this error bellow:

           $ singularity shell --writable namd.img
     WARNING: Non existent bind point (file) in container: '/etc/localtime'
     ERROR  : Base home directory does not exist within the container: /nfs
     ABORT  : Retval = 255

Also, it would be nice to not have the user create another image to solve this issue.

Thank you in advance.

v

unread,
Apr 12, 2018, 2:49:02 PM4/12/18
to singu...@lbl.gov
Hi Samy,

Singularity Hub will not build a writable image, it will build you squashfs. What you can do is build directly from a singularity hub uri into a writable image:

   sudo singularity build --writable newImage.simg shub://vsoch/hello-world

That will save you one step of needing to pull first as the pull is done at the same time as the build. The issue with the time is just a warning, but you should post an issue on the Singularity issue board if you think there is something fishy going on! From the look of it, you are probably trying to shell into the container that has a home defined in /nfs, and your cluster probably has overlayfs disabled so it cannot make this path on the fly. Try setting --home to be something else (that does exist on your cluster or where you are running it) to see if it goes away. I would also suggest doing sudo with --writable, I don't see how you can interact with an image with --writable without it (unless you are user root).

Best,

Vanessa

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



--
Vanessa Villamia Sochat
Stanford University '16

Samy

unread,
Apr 13, 2018, 1:16:50 PM4/13/18
to singularity
Yes i was root in that system and didn't need sudo.
The pull and build in one line is a better option. Will just use that for now. 

Thank you Vanessa.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.

v

unread,
Apr 13, 2018, 1:34:56 PM4/13/18
to singu...@lbl.gov
Sure thing! Have a good Friday :)

To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.
Reply all
Reply to author
Forward
0 new messages