-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from arcaneframework/dev/al-readme-update
Update readme
- Loading branch information
Showing
4 changed files
with
181 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,173 @@ | ||
# containers | ||
Containers with Arcane and Alien | ||
# Containers with Arcane and Alien | ||
|
||
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. | ||
|
||
- [Containers with Arcane and Alien](#containers-with-arcane-and-alien) | ||
- [With Spack](#with-spack) | ||
- [Without Spack](#without-spack) | ||
- [Types](#types) | ||
- [Tags](#tags) | ||
- [Base images](#base-images) | ||
- [Images updated every week](#images-updated-every-week) | ||
- [Images generated on demand](#images-generated-on-demand) | ||
- [Dockerfiles](#dockerfiles) | ||
- [Images usage](#images-usage) | ||
|
||
## With Spack | ||
|
||
TODO | ||
|
||
|
||
## Without Spack | ||
|
||
These images are build without Spack. Packages are installed using | ||
the package manager available by default (example: `apt` in Ubuntu). | ||
|
||
|
||
### Types | ||
|
||
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 macros `ARCCORE_DEBUG` and | ||
`ARCCORE_CHECK` are defined. | ||
|
||
These types are found in tags. | ||
|
||
|
||
### Tags | ||
|
||
There are two types of tags : | ||
1. An available compiler, latest version available | ||
(example : `gcc-12_full_release_latest`); | ||
2. 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. | ||
|
||
|
||
### Base images | ||
|
||
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. | ||
|
||
|
||
### Images updated every week | ||
|
||
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](https://github.com/orgs/arcaneframework/packages?repo_name=framework-ci)) : | ||
- `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. | ||
|
||
|
||
### Images generated on demand | ||
|
||
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". | ||
|
||
|
||
### Dockerfiles | ||
|
||
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)](https://github.com/arcaneframework/framework-ci#images-disponibles) | ||
. | ||
|
||
Example of using the script : | ||
```bash | ||
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. | ||
``` | ||
|
||
|
||
### Images usage | ||
|
||
In these images, Arcane is installed in the default installation | ||
directory (`/usr/local`). | ||
A user is also created and used by default. This is the user | ||
`arcane_user`. | ||
Note that `sudo` is not available, so if you want to run commands | ||
as `root`, you need to specify the `root` user in the execute command: | ||
`docker exec -u root -it <image> bash`. | ||
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 : | ||
```bash | ||
# In a termuinal, 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 contener. | ||
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 | ||
``` |