Code Monkey home page Code Monkey logo

containers's Introduction

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.

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.

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

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) :

  • 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) .

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.

Images usage

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

containers's People

Contributors

cedricchevalier19 avatar alexlher avatar

Watchers

 avatar

containers's Issues

Documentation

Write explanations on

  • how to build images
  • how to use images to use Alien or Arcane
  • how to use images to develop with clion
  • how to use images to develop with vscode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.