Singularity cache directory

916 views
Skip to first unread message

Felix Bartusch

unread,
Jul 27, 2017, 4:15:16 AM7/27/17
to singularity
Hello,

I bootstrapped some Singularity containers from docker images. Now, I see that the the directory /root/.singularity/ exists and the that the subdirectory /root/.singularity/docker has a size of ~2GB.
During the bootstrapping the message 'Cache folder set to /root/.singularity/docker' is printed to the console. I would assume that the cache is removed after the bootstrapping, or is this the intended behaviour?

vanessa s

unread,
Jul 27, 2017, 11:47:55 AM7/27/17
to singu...@lbl.gov
Cache is not removed, but you can set it to be something different (e.g. /tmp) by exporting SINGULARITY_CACHEDIR.

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...@lbl.gov.

Felix Bartusch

unread,
Jul 28, 2017, 3:24:45 AM7/28/17
to singularity
The possibility to change this in the configuration file would be very convenient for us.
We're testing singularity on our cluster and were surprised that these file are stored in roots home.
I'm totally aware of the fact, that for the normal user creates the container on their local machine and uploads the container afterward to the cluster, but sometimes we are testing things directly on the cluster.

Another question:
Why is the cache not removed? I don't think that the files in the cache directory are needed after bootstrapping. Am I right?
Or is the cache used if a new Singularity container gets bootstrapped from the same Docker image?

Cheers,

Felix

vanessa s

unread,
Jul 28, 2017, 3:59:36 AM7/28/17
to singu...@lbl.gov
You can change the cache with the environment variable SINGULARITY_CACHEDIR, and it's a good idea that we might have this in the config. Do you want to open an issue?

The layers and images from Singularity hub that go into the cache are in fact reused if you bootstrap again and need a layer that was previously downloaded. You still would extract into the new image, but not need to wait for download.

Best,

Vanessa

Felix Bartusch

unread,
Jul 28, 2017, 4:59:25 AM7/28/17
to singularity
I just opened an issue.

Thanks for your explanation!
Reply all
Reply to author
Forward
0 new messages