Developer Install: Apptainer
These instructions were recently updated. If anything is unclear or you have suggestions for improvement, please share your feedback in this GitHub discussion.
The following instructions describe the use of Apptainer to build and execute MOOSE and MOOSE-based applications within pre-built containers that contain all necessary dependencies. This install method also contains pre-built versions of the optional dependencies libTorch, MFEM, and NEML2.
This is the preferred method of building MOOSE and MOOSE-based applications on Linux.
The use of these environments in a HPC environment across nodes (i.e., using MPI to run a job on multiple nodes) is not supported out of the box. You will need your system administrator to setup cross-node MPI by binding in the host MPI into the container.
This is supported on INL HPC in which case you should follow the instructions in Developer Install: INL HPC instead.
To begin, follow these instructions:
Enter the Environment: Enter the development environment that contains the necessary dependencies for building and running an application.
Build and Test: Build and test an application.
Additional information is provided in the following sections:
Non-shell Execution: Execute an application or command in the development environment without entering a shell within the container.
Additional Usage: Describes additional options that can be provided to Apptainer when using the development environment.
Container Listing: Describes all of the public containerized environments available for execution.
Enter the Environment
Multiple containerized environments exist for use. By default, we will assume the use of the moose-dev-openmpi-x86_64 container (see Container Listing for a full list of available containerized environments). This container is sufficient for most use cases.
To build and execute MOOSE and MOOSE-based applications, all that is needed is to enter the containerized environment. To enter an interactive shell inside the the containerized development environment, run the following:
apptainer shell oras://ghcr.io/idaholab/apptainer/moose-dev-openmpi-x86_64:2026.05.08
If a message like "apptainer: command not found" is emitted, use your system package manager (yum, dnf, apt-get, etc) to install Apptainer or request that is installed by your system administrator. On INL HPC systems, apptainer is made available via a module (i.e., module load apptainer).
At this point, you are inserted within an interactive shell inside of the containerized development environment and all of the necessary dependencies for building MOOSE and MOOSE-based applications are available.
Applications built within the containerized environment can only be ran within the containerized environment. Thus, if you build an application within the shell and later forget to execute it within the shell, the application will fail to run.
Build and Test
After following the instructions to enter the environment in Enter the Environment, we will next build and test MOOSE or a MOOSE-based application.
The commands commands that follow must be ran within the apptainer shell environment described above in Enter the Environment.
Follow the instructions in Build and Test: MOOSE if you are building MOOSE. Otherwise, follow the instructions in Build and Test: MOOSE Application.
Build and Test: MOOSE
In this example, we will test the MOOSE framework. You should run this example if you are using this development environment to develop MOOSE itself. Here, we assume that a MOOSE repository is available within ~/projects/moose. If you have cloned MOOSE in a different location, you should replace the directory in the first command that follows with the directory in which MOOSE is cloned.
cd ~/projects/moose
cd test
make -j 4
./run_tests -j 4
The above will compile the MOOSE test application and run the tests.
You can also build and test the MOOSE combined application (which contains all of the physics modules) if you wish with the following:
cd ~/projects/moose/modules
make -j 4
./run_tests -j 4
Build and Test: MOOSE Application
In this example, we will test building and running tests for a MOOSE-based application. You should run this example if you are using this development environment to develop a MOOSE-based application.
Run the following, replacing the directory in the first command (/path/to/app) to the directory that your MOOSE-based application is cloned to:
cd /path/to/app
make -j 4
./run_tests -j 4
The above will compile the MOOSE-based application and run its tests.
Non-shell Execution
The instructions provided in Enter the Environment allow you to enter a shell environment within the containerized development environment. You can also execute something within this environment without entering the shell (like running a built MOOSE application).
For this, you can utilize the apptainer exec command, for example:
apptainer exec oras://ghcr.io/idaholab/apptainer/moose-dev-openmpi-x86_64:2026.05.08 /path/to/app-opt -i input.i
This will execute the command:
/path/to/app-opt -i input.i
within the containerized development environment.
Additional Usage
The apptainer shell and apptainer exec commands described above are commonly augmented in the following ways:
Use a Different Container
The container name moose-dev-openmpi-x86_64 can be changed another container, for example, moose-dev-cuda-openmpi-x86_64, to use the environment that has CUDA available. For example:
apptainer shell oras://ghcr.io/idaholab/apptainer/moose-dev-cuda-openmpi-x86_64:2026.05.08
Use NVIDIA GPUs
GPUs are not available by default in the containerized environment. The command line argument --nv will bind in the necessary context from the host systems to enable the use of NVIDIA GPUs in the containerized environment. For example:
apptainer shell --nv oras://ghcr.io/idaholab/apptainer/moose-dev-cuda-openmpi-x86_64:2026.05.08
Bind Mount Directories
By default, Apptainer will make available the your home directory in the environment, and the current directory you are in. Other directories from the host system may not be available.
Let's say that you have a directory /data on your system that you want to access within the containerized development environment. By default, it will not be available. To "bind mount" (mount the directory into the containerized environment) directories, the command line option -B is used. For example, to bind mount /data into the containerized environment, you would run:
apptainer shell -B /data oras://ghcr.io/idaholab/apptainer/moose-dev-openmpi-x86_64:2026.05.08
Using Other Versions
The suffix in the container URI (the oras://.. component) is the container "tag". This tag represents the version. Here, we use the current version which is 2026.05.08. This tag can be replaced with an older tag to use an older version, which can be required if using a version of MOOSE that is not the latest version.
Container Listing
Multiple containerized environments are available for execution:
moose-dev-openmpi-x86_64:2026.05.08
RockyLinux 8.10 operating system
OpenMPI 5.0.10, installed at
$MOOSE_OPENMPI_DIR=/opt/openmpi
moose-dev-mpich-x86_64:2026.05.08
RockyLinux 8.10 operating system
MPICH 5.0.1, installed at
$MOOSE_MPICH_DIR=/opt/mpich
moose-dev-rocky9-mpich-x86_64:2026.05.08
RockyLinux 9.7 operating system
MPICH 4.3.2, installed at
$MOOSE_MPICH_DIR=/opt/mpich
moose-dev-cuda-openmpi-x86_64:2026.05.08
RockyLinux 8.10 operating system
OpenMPI 5.0.10, installed at
$MOOSE_OPENMPI_DIR=/opt/openmpiCUDA 12.9.1, installed at
$CUDA_DIR=/usr/local/cudaCUDA aware builds of OpenMPI, PETSc, libTorch, NEML2, and MFEM
All of the containerized environments above contain the following installed packages:
| Package | Version | Location |
|---|---|---|
| code-server | 4.118.0 | /usr/bin/code-server |
| Conduit | 4ae5a69 | $CONDUIT_DIR=/opt/conduit |
| libMesh | aeab0b9 | $LIBMESH_DIR=/opt/libmesh |
| libTorch | v2.11.0 | $LIBTORCH_DIR=/opt/libtorch |
| GCC | 13.3.1 | /opt/rh |
| MFEM | e52948f | $MFEM_DIR=/opt/mfem |
| NEML2 | 9b8d8b9 | $NEML2_DIR=/opt/neml2 |
| PETSc | v3.25.1 | $PETSC_DIR=/opt/petsc |
| Python | 3.14.4 | /opt/miniforge3/envs/moose/bin/python |
| VTK | 9.6.1 | $VTK_DIR=/opt/vtk |
| WASP | 09054a2 | $WASP_DIR=/opt/wasp |