-
Notifications
You must be signed in to change notification settings - Fork 101
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
Env. variables SINGULARITY_TEMPDIR, SINGUALRITY_CACHEDIR, TMPDIR not passed to singularity #1339
Comments
Hello - this is not a release of SingularityCE (this project). Singularity forked into what is now known as Apptainer, and SingularityCE, during the 3.8 series. The last 3.8 release on this (SingularityCE) side of the fork was 3.8.4. Tha apptainer side of the fork made some additional 3.8.x releases before renaming to apptainer, and your 3.8.6-1 installation is one of those. Any version of singularity reporting itself as 3.8.6 comes from the retired repository on the apptainer side of the fork: https://github.com/apptainer/singularity If you would like us to investigate this issue under SingularityCE, please could you replicate it using a current supported version of SingularityCE? The latest version is In EPEL, SingularityCE 3.10.5 is currently available via Thank you. |
Regarding the report you have made above, I don't believe there is a bug here. You are You need to See: https://docs.sylabs.io/guides/3.11/user-guide/build_env.html#temporary-folders |
I believe you might be using ufs-srweather-app? I have written a PR correcting their guide here: |
@dtrudg - thank you a lot for your comment! Yes, it is very helpful, indeed the "SINGULARITY_TMPDIR" instead of "...TEMPDIR" is the culprit.
It would be really helpful to have these env. variables shown when queried, for debugging or other purposes, such as binding correct directories to allow for "...TMPDIR" and "...CACHEDIR" creation. Thank you! |
@natalie-perlin - we don't pass these variables into the container, because if we did they would affect the behavior if another 'singularity' was run inside the container. Nested execution of containers is more common then might be expected. To verify the effect of SINGULARITY_ variables, you can usually look at the E.g.
Note how the line there shows that we These environment variables are read from the host, not the container, so you can also always check if they are set by running |
Version of Singularity
What version of Singularity are you using? Run:
Describe the bug
A clear and concise description of what the bug is.
Attempting to build a singularity image from the docker container. Getting errors "no space left on device" for the /tmp directory, even though the environment variables
SINGULARITY_TEMPDIR
,SINGULARITY_TEMPDIR
, andTMPDIR
are set to point to a different location, as following, before runningsingularity
command:Attempted to run with both regular user and with sudo, with the same outcome.
sudo -E singularity shell -B /lustre docker://noaaepic/ubuntu20.04-intel-landda:develop
sudo -E singularity shell -B /lustre docker://noaaepic/ubuntu20.04-intel-landda:develop
It fails on systems with smaller /tmp space, producing error such as:
FATAL: Unable to handle docker://noaaepic/ubuntu20.04-intel-landda:develop uri: while building SIF from layers: packer failed to pack: while unpacking tmpfs: error unpacking rootfs: unpack layer: unpack entry: usr/local/lib/python3.8/dist-packages/numpy.libs/libopenblas64_p-r0-15028c96.3.21.so: unpack to regular file: short write: write /tmp/build-temp-956582340/rootfs/usr/local/lib/python3.8/dist-packages/numpy.libs/libopenblas64_p-r0-15028c96.3.21.so: no space left on device
To Reproduce
Steps to reproduce the behavior:
I performed a simple test to verify that the env. variables $SINGULARITY_TEMPDIR and $SINGULARITY_CACHEDIR are not passed into the singularity, by shelling into a smaller docker image. Same behavior occurs when the sandbox is created first.
sudo -E singularity shell -B /lustre docker://ubuntu:latest
(after it's finished building, query the env. variables:)
(UPD:) When it is launched as a regular user, the TMPDIR variable does happen to be passed to singularity
singularity shell -B /lustre docker://ubuntu:latest
It demonstrates that the singularity does not receive the variables set for cache and tmpdir.
Expected behavior
Expecting to see $SINGUALRITY_CACHEDIR, $SINGUALRITY_TEMPDIR, and $TMPDIR variables being passed when singularity is launched, and appear when prompted in the singularity shell, e.g.:
OS / Linux Distribution
Which Linux distribution are you using?
Linux 3.10.0-1160.59.1.el7.x86_64
Installation Method
Write here how you installed SingularityCE. Eg. RPM, source.
(not sure, not installed myself)
Additional context
Anything else which might be relevant. E.g. if the bug only occurs on a specific filesystem, or kernel version etc.
The bug does not occur on the system when the /tmp is sufficiently large.
The text was updated successfully, but these errors were encountered: