Apptainer: Difference between revisions
No edit summary |
Update the location of the apptainer modules |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
Apptainer is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Apptainer on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system. | Apptainer is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Apptainer on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system. | ||
Apptainer is a fork of singularity and thus, also supports singularity commands and workflows. | Apptainer is a fork of singularity and, thus, also supports singularity commands and workflows. | ||
==Apptainer on Anunna== | ==Apptainer on Anunna== | ||
Since Apptainer is not dependent on specific compilers and toolchains, it is now place inside the '''utilities''' bucket. Inside this bucket, there are two options: | |||
* Apptainer | |||
* Apptainer-epel | |||
The regular '''Apptainer''' module loads the version compiled in Anunna. This is more suitable to containers built with more recent operating systems. For most projects this will be enough. | |||
However, some projects still use some very old Linux versions and through errors related to missing versions of GLIBC when running in Anunna. That is where '''Apptainer-epel''' comes in, this is a package distributed by the Fedora Project EPEL (Extra Packages for Enterprise Linux) repositories. This package is built with a broad range of versions of GLIBC in mind, so will likely work with older images like ubuntu 22.04 or older. | |||
One can load apptainer by running the following commands | One can load apptainer by running the following commands | ||
<pre>module load | <pre>module load utilities | ||
module load Apptainer</pre> | module load Apptainer</pre> | ||
| Line 15: | Line 23: | ||
Apptainer will cache SIF container images generated from remote sources, and any OCI/docker layers used to create them. The cache is created at <code>$HOME/.apptainer/cache</code> by default. The location of the cache can be changed by setting the <code>APPTAINER_CACHEDIR</code> environment variable. | Apptainer will cache SIF container images generated from remote sources, and any OCI/docker layers used to create them. The cache is created at <code>$HOME/.apptainer/cache</code> by default. The location of the cache can be changed by setting the <code>APPTAINER_CACHEDIR</code> environment variable. | ||
Since there is a limited amount of space available at $HOME, the Apptainer cache can quickly fill your quota. So it is recommended that you set the variable <code>APPTAINER_CACHEDIR</code> to a location ion lustre by edition your <code>$HOME/.bash_aliases</code> file. An example is provided at | Since there is a limited amount of space available at <code>$HOME</code>, the Apptainer cache can quickly fill your quota. So it is recommended that you set the variable <code>APPTAINER_CACHEDIR</code> to a location ion lustre by edition your <code>$HOME/.bash_aliases</code> file. An example is provided at [[Aliases and local variables]] | ||
Latest revision as of 13:53, 19 November 2025
Apptainer is a container platform. It allows you to create and run containers that package up pieces of software in a way that is portable and reproducible. You can build a container using Apptainer on your laptop, and then run it on many of the largest HPC clusters in the world, local university or company clusters, a single server, in the cloud, or on a workstation down the hall. Your container is a single file, and you don’t have to worry about how to install all the software you need on each different operating system.
Apptainer is a fork of singularity and, thus, also supports singularity commands and workflows.
Apptainer on Anunna
Since Apptainer is not dependent on specific compilers and toolchains, it is now place inside the utilities bucket. Inside this bucket, there are two options:
- Apptainer
- Apptainer-epel
The regular Apptainer module loads the version compiled in Anunna. This is more suitable to containers built with more recent operating systems. For most projects this will be enough.
However, some projects still use some very old Linux versions and through errors related to missing versions of GLIBC when running in Anunna. That is where Apptainer-epel comes in, this is a package distributed by the Fedora Project EPEL (Extra Packages for Enterprise Linux) repositories. This package is built with a broad range of versions of GLIBC in mind, so will likely work with older images like ubuntu 22.04 or older.
One can load apptainer by running the following commands
module load utilities module load Apptainer
Initial Setup
Apptainer will cache SIF container images generated from remote sources, and any OCI/docker layers used to create them. The cache is created at $HOME/.apptainer/cache by default. The location of the cache can be changed by setting the APPTAINER_CACHEDIR environment variable.
Since there is a limited amount of space available at $HOME, the Apptainer cache can quickly fill your quota. So it is recommended that you set the variable APPTAINER_CACHEDIR to a location ion lustre by edition your $HOME/.bash_aliases file. An example is provided at Aliases and local variables