Apptainer: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 353: Line 353:


followed by runninng <code>docker image rm ID</code> (where ID is the image ID output from the <code>docker images</code> command) in order to free up the disk space associated with those other image layers on the system you are using.
followed by runninng <code>docker image rm ID</code> (where ID is the image ID output from the <code>docker images</code> command) in order to free up the disk space associated with those other image layers on the system you are using.
=Miscellaneous Items=
==Cleaning Apptainer's Cache Directory==
Over time Apptainer's file cache will grow. To see where these files are run:
apptainer cache list
and to remove those files, run:
apptainer cache clean
==Changing Apptainer's Default Directories==
You can override Apptainer's default temporary and cache directories by setting these environment variables before running <code>apptainer</code>:
* <code>APPTAINER_CACHEDIR</code>: the directory where Apptainer will download and cache files
* <code>APPTAINER_TMPDIR</code>: the directory where Apptainer will write temporary files including when building (squashfs) images
For example, to tell Apptainer to use your scratch space for its cache and temporary files (which is might be a better location), one might run:
$ mkdir -p /scratch/$USER/apptainer/{cache,tmp}
$ export APPTAINER_CACHEDIR="/scratch/$USER/apptainer/cache"
$ export APPTAINER_TMPDIR="/scratch/$USER/apptainer/tmp"
before running <code>apptainer</code>.
cc_staff
156

edits

Navigation menu