This repository contains the files needed to build the Docker images with Arcane and Alien. GH Actions is used to build the images and save them in the "Package" part of this repository.
Two types of images are available: with Spack and without Spack.
TODO
These images are build without Spack. Packages are installed using
the package manager available by default (example: apt
in Ubuntu).
Currently, there are two image sizes available :
- minimal : contains the minimal set of packages to be able to use Arcane.
- full : contains the maximum set of packages to be able to use the maximum of Arcane's features.
Also, there are three types of Arcane builds available :
- release: mode without checking or debug message,
- check: activates the check mode, in which you check for table
overflows. In this mode, the macro
ARCCORE_CHECK
is defined, - debug: activates the
debug()
display macros and the check mode. In this mode, the macrosARCCORE_DEBUG
andARCCORE_CHECK
are defined.
These types are found in tags.
There are two types of tags :
- An available compiler, latest version available
(example :
gcc-12_full_release_latest
); - An available compiler, with build date
(example :
gcc-12_full_release_20221219
).
Arcane and these components will have been compiled with the chosen compiler.
The tag 1.
allows to have the last version of the image.
The tag 2.
allows you to choose an image according to its creation
date.
If you want to have the same working environment, the same versions of the tools permanently (to reproduce bugs for example), this tag is good.
Warning : The image tag with cuda
will (probably) be changed in the future
with the addition of "gcc" or "clang" in it.
Exemple :
- Now :
cuda-120_full_release_latest
- In the future :
gcc-cuda-120_full_release_latest
To build our images, we use the images build to run CIs from the main repository (framework). These are our "base images". They are available here: https://github.com/arcaneframework/framework-ci#images-disponibles
These images include the packages needed to compile and run Arcane. In this repository, we just add Arcane install in the image directly.
A set of images has been chosen to be automatically regenerated every Sundays. These images will change every week (except if you choose a tag with a creation date).
Here are the automatically regenerated images (you can change latest
by a date, see here) :
arcane_ubuntu-2204:
gcc-12
_full_release_latest
_full_check_latest
_full_debug_latest
_minimal_release_latest
_minimal_debug_latest
Example :
arcane_ubuntu-2204:gcc-12_full_release_latest
These images are generated by the "Weekly Images Creator" workflow.
It is also possible to generate images on demand. In fact, GH Actions allows us to generate a simple interface allowing the user to make choices. The "Image Creator" workflow uses this possibility to choose the image to generate.
To use it, simply go to the "Actions" tab, go to the "Image Creator" workflow, click on "Run workflow" and choose the image desired image.
This image will be build and available in "Package".
Note also that it is possible to generate only the Dockerfile by choosing the appropriate option in the interface. The generated Dockerfile will be available as an "Artifact".
Because the Dockerfiles of each version are similar, we have a script
that generates the Dockerfiles according to the given options.
This script can be found here : .github/scripts/DockerfileGenerator.sh
and uses the Dockerfile.in
from the same folder.
This script is used by GH Actions to generate Dockerfiles and this generated file is used to generate the Docker images. This script can also be used locally.
However, this script does not include a check for the existence of the "base image". It is yours to do it (see here) .
Example of using the script :
cd .github/scripts
./DockerfileGenerator.sh -s ubuntu-2204 -c clang-15 -b full -a release
# Dockerfile for "arcane_ubuntu-2204:clang-15_full_release_latest" image.
In these images, Arcane is installed in the default installation
directory (/usr/local
).
If you want to compile an application using Arcane, it is not necessary
to specify the Arcane installation directory.
Here is a set of commands to compile and run QAMA
in container :
# In a terminal, with Podman or Docker installed.
IMAGE_ID=$(docker pull ghcr.io/arcaneframework/arcane_ubuntu-2204:gcc-12_minimal_release_latest)
CONTAINER_ID=$(docker run -dt "$IMAGE_ID")
docker exec -it "$CONTAINER_ID" bash
# Interactive terminal of container.
cd /tmp
git clone https://github.com/arcaneframework/arcane-benchs
mkdir build/
cmake -S arcane-benchs/quicksilver/ -B build/ -GNinja
cmake --build build/
./build/src/Quicksilver \
-A,ReferenceDirectory=./arcane-benchs/quicksilver/reference_files/ \
./arcane-benchs/quicksilver/data/tests/ExampleFull.arc
exit