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

apptainer clean temp files #119

Draft
wants to merge 1 commit into
base: proposed_changes
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/source/user_guide/containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ Commands can be run from within a container using the `apptainer run <https://ap

If you encounter ``$HOME`` quota issues with Apptainer caching in ``~/.apptainer``, the environment variable ``APPTAINER_CACHEDIR`` can be used to select a different location such as a directory under ``/scratch``. See also, `apptainer build environment <https://apptainer.org/docs/user/main/build_env.html>`_

Temporary Files
~~~~~~~~~~~~~~~~~~~
Apptainer creates temporary files its local /tmp directory. Users occasionally encounter problems building images with apptainer when the /tmp space on a compute node (which is finite) filling up, which results in this error message:

.. code-block::

FATAL: While performing build: while creating squashfs: create command
failed: exit status 1:
Write failed because No space left on device

If apptainer fails in this way, run the command ``rm rf /tmp/build-temp*`` to remove apptainer's temporary files.

Your ``$HOME`` is automatically available from containers run via Apptainer.
You can ``pip3 install --user`` against a container's python, setup virtual environments, or similar while using a containerized application.
Just run the container's ``/bin/bash`` to get an Apptainer> prompt (or use ``apptainer shell <container>`` for a quick look from a login node).
Expand Down