Install Feel++ from Containers

The recommended way to start learning Feel++ consists in using container technologies. Containers provide an all-in one programming environment to start directly using Feel++. Feel++ is provided with two containers solutions currently:

Depending on your usage and your operating system, you might prefer using one of these previous solutions. On a laptop or workstation Docker and Singularity are preferred while on a cluster Singularity is preferred.

The next sub-sections describe how to obtain Feel++ images to begin with Feel++ programming.

Feel++ images provide either a compiling environment with all dependencies, executables or both.
Before going further you might want to install one of the previous solution. install docker or install singularity.

1. Docker

Using Feel++ inside Docker is the recommended and fastest way to use Feel++. The Docker chapter is dedicated to Docker and Feel++ containers chapter is dedicated to Feel++ in Docker. We strongly encourage you to follow these steps if you begin with Feel++ in particular as an end-user. Users who would like to develop with and in Feel++ should read through the remaining sections of this chapter.

To begin with Feel++ using docker, you need first to install docker to have a working docker environment on your machine following the official documentation with respect to your operating system. Then choose one of the Feel++ images available on the official repository dockerhub.

We provide currently two main images:

Table 1. Table of the current components of the FCS
Component Description Built From

feelpp

Feel++ libraries and tools

feelpp-toolboxes

Feel++ Toolboxes

feelpp

1.1. Usage example

Via the command line and using the Feel++ toolboxes below, we get the image and create a new container.

docker pull feelpp/feelpp-toolboxes (1)
docker run -it -v ${HOME}/feel:/feel feelpp/feelpp-toolboxes (2)
1 fetch the latest feelpp/feelpp-toolboxes image
2 create a container associated to feelpp/feelpp-toolboxes, execute in interactive mode and mount $HOME/feel on /feel in Docker in order to access the simulation results outside the Docker image.

The -it option is used to place yourself inside the container in an interactive mode. You can start using Feel++ commands directly. Note that the -v option is used to share a folder between the host and the container.

Each container can be seen as an instance for the choosen image. You can create as many instance as you desire!

It is also possible to execute a Feel++ application or a command embedded in the container from the outside. For example

docker run feelpp/feelpp-toolboxes echo "Hello World!"
To keep your data in the container, you can use docker [start|stop] -i <container name>.

Many examples are available in the Feel++ tools and toolboxes. For example, once you are in Docker,

Run the CFD toolbox on the TurekHron benchmark
mpirun --bind-to core -np 10 feelpp_toolbox_fluid --case "github:{path:toolboxes/fluid/TurekHron}"

2. Apptainer

Apptainer is a container technology initially developed to work with HPC infrastructure and address security issues in multi-user environments. It allows users to run applications in a portable and reproducible environment, making it ideal for scientific and engineering workflows.

We now pull/push SIF images from/to GitHub Container Registry (ghcr.io). Feel images can be found at the following link: https://github.com/feelpp/feelpp/pkgs/container/feelpp[> Feel Packages].

We currently provide the same main images as for Docker, but the suffix naming might vary depending on the image version.

To download and use Feel++ Apptainer images, follow the steps below:

Download and run the Feel++ Apptainer image: contains feelpp, feelpp-toolboxes, feelpp-mor and feelpp-python
apptainer pull -F feelpp-noble.sif oras://ghcr.io/feelpp/feelpp:v0.111.0-preview.10-noble-sif
apptainer inspect feelpp-noble.sif
apptainer run feelpp-noble.sif feelpp_toolbox_fluid --version
These images are also available for:

* Ubuntu 22.04 (jammy): ghcr.io/feelpp/feelpp:v0.111.0-preview.10-jammy-sif
* Ubuntu 20.04 (focal): ghcr.io/feelpp/feelpp:v0.111.0-preview.10-focal-sif
* Debian 12 (bookworm): ghcr.io/feelpp/feelpp:v0.111.0-preview.10-bookworm-sif

Apptainer works in a similar way to Docker. For example, you can download one of the images available on ghcr.io and run it interactively or execute specific commands within the container.

Once downloaded, you can enter the container interactively with the command line:

Run the container interactively
apptainer shell feelpp-noble.sif

Or run a specific command:

apptainer run feelpp-noble.sif feelpp_toolbox_fluid --version
You can retrieve images from the GitHub Container Registry directly using apptainer pull -F feelpp-noble.sif oras://ghcr.io/feelpp/feelpp:v0.111.0-preview.10-noble-sif. Make sure to check for the latest versions and tags.