How to fix Singularity build has run out of space
— Posts — 1 min read
You see an error message like this:
This tells you there is not enough space for Singularity to build your container.
What can you do?
You can disable the Singularity cache, or get it to write somewhere else. There are two variables to play with:
- SINGULARITY_DISABLE_CACHE If you want to disable the cache, this means is that the layers are written to a temporary directory. Thus, if you want to disable cache and write to a temporary folder, simply set SINGULARITY_DISABLE_CACHE to any true/yes value. By default, the cache is not disabled.
- SINGULARITY_CACHEDIR Is the base folder for caching layers and singularity hub images. If not defined, it uses default of $HOME/.singularity. If defined, the defined location is used instead.
Either of these could help avoid writing docker layers to /root/.singularity/docker.