Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum RAM requirement for building #310

Open
verdurin opened this issue May 9, 2018 · 4 comments
Open

Minimum RAM requirement for building #310

verdurin opened this issue May 9, 2018 · 4 comments
Assignees

Comments

@verdurin
Copy link

verdurin commented May 9, 2018

Version of Singularity:

2.5.1

Expected behavior

Singularity should complain if there is an attempt to build when there isn't sufficient memory on the build host.

Actual behavior

Lots of errors, including:

Warning handling tar header: Write failed
tar extraction error: Write failed

and later on:

cp: error writing '/var/singularity/mnt/container/etc/resolv.conf': No space left on device

which is what led me to suspect lack of RAM.

Steps to reproduce behavior

Build container from

https://github.com/rses-singularity/tfgpu-theano-pytorch-keras

in Fedora 27 VM with 2GB RAM.

Build fails.

Reconfigure VM with 4GB RAM.

Build succeeds.

There isn't necessarily a fix here, but it would be helpful if Singularity could be clearer about the problem when it occurs.

@cclerget
Copy link
Contributor

@verdurin Singularity use /tmp as temporary folder to build image, so your /tmp directory is a RAM filesystem like tmpfs. By default tmpfs use almost 50% of total memory, which could explain why after growing VM memory build succeed. Singularity doesn't have RAM requirements for builds, you can use another directory other than /tmp by setting SINGULARITY_TMPDIR environment variable like this :

$ SINGULARITY_TMPDIR=/var/tmp singularity build image.simg Singularity

Between it could be difficult to catch the error because exit code doesn't necessary reflect the error code of command

@verdurin
Copy link
Author

@cclerget yes, I know it's not an easy one to handle. Maybe it's worth mentioning this in the documentation?

@cclerget
Copy link
Contributor

@verdurin You're right, we can mention this kind of error in the documentation

@dtrudg dtrudg self-assigned this Feb 4, 2020
@dtrudg
Copy link
Contributor

dtrudg commented Feb 4, 2020

Still need to mention tmpfs in docs nicely.

@dtrudg dtrudg transferred this issue from apptainer/singularity Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants