From 5860c29e07372a20ea061af5ea8f545f541ae77e Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 12:38:16 +0200 Subject: [PATCH 01/21] update feelpp-env.yml and Dockerfile-debian-13 for improved build process and dependencies Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- .github/workflows/feelpp-env.yml | 77 +++++++++++++------------------- feelpp-env/Dockerfile-debian-13 | 1 + 2 files changed, 32 insertions(+), 46 deletions(-) create mode 120000 feelpp-env/Dockerfile-debian-13 diff --git a/.github/workflows/feelpp-env.yml b/.github/workflows/feelpp-env.yml index e21866ede..1d46ce44e 100644 --- a/.github/workflows/feelpp-env.yml +++ b/.github/workflows/feelpp-env.yml @@ -35,8 +35,6 @@ on: default: 'linux/amd64,linux/arm64' type: string - - jobs: activate: @@ -48,7 +46,6 @@ jobs: steps: - run: echo ok go - all_images: if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'all skip') }} strategy: @@ -56,25 +53,25 @@ jobs: max-parallel: 4 matrix: include: - - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } -# - {service: feelpp-env, dist: buster, flavor: debian, version: 10, tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } -# - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: buster, flavor: debian, version: "10", tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: trixie, flavor: debian, version: "13", tag: debian-13, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } runs-on: self-docker needs: activate name: ${{ matrix.flavor }}-${{ matrix.version }} continue-on-error: ${{ matrix.experimental }} steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v5 with: -# lfs: true token: ${{ secrets.CR_PAT }} submodules: recursive - name: generate @@ -84,30 +81,25 @@ jobs: ls -lrt id: generate working-directory: feelpp-env - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - - - name: Build ${{ matrix.service }}:${{ matrix.tag }} - uses: docker/build-push-action@v3 + - name: Build ${{ matrix.service }}:${{ matrix.tag }} + uses: docker/build-push-action@v6 with: context: ./${{ steps.generate.outputs.context }} tags: ghcr.io/feelpp/${{ matrix.service }}:${{ matrix.tag }} file: ./${{ steps.generate.outputs.context }}/${{ matrix.dockerfile }} push: ${{ github.event_name != 'pull_request' }} platforms: ${{ matrix.platforms }} - - - name: Trigger build runner:${{ matrix.tag }} + - name: Trigger build runner:${{ matrix.tag }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.CR_PAT }} @@ -115,7 +107,6 @@ jobs: event-type: runner-update-baseimage client-payload: '{"flavor":"${{ matrix.flavor }}","version":"${{ matrix.version }}"}' - one_image: if: ${{ github.event_name == 'workflow_dispatch' }} runs-on: self-docker @@ -125,9 +116,8 @@ jobs: tag: ${{ inputs.flavor }}-${{ inputs.version }} service: feelpp-env steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v5 with: -# lfs: true token: ${{ secrets.CR_PAT }} submodules: recursive - name: generate @@ -137,30 +127,25 @@ jobs: ls -lrt id: generate working-directory: feelpp-env - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - - - name: Build ${{ env.service }}:${{ env.tag }} - uses: docker/build-push-action@v3 + - name: Build ${{ env.service }}:${{ env.tag }} + uses: docker/build-push-action@v6 with: context: ./${{ steps.generate.outputs.context }} tags: ghcr.io/feelpp/${{ env.service }}:${{ env.tag }} file: ./${{ steps.generate.outputs.context }}/${{ inputs.dockerfile }} push: ${{ github.event_name != 'pull_request' }} platforms: ${{ inputs.platforms }} - - - name: Trigger build runner:${{ env.tag }} + - name: Trigger build runner:${{ env.tag }} uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.CR_PAT }} diff --git a/feelpp-env/Dockerfile-debian-13 b/feelpp-env/Dockerfile-debian-13 new file mode 120000 index 000000000..4407bedc5 --- /dev/null +++ b/feelpp-env/Dockerfile-debian-13 @@ -0,0 +1 @@ +Dockerfile-debian \ No newline at end of file From 64f3b29aee1e254f878739f396438a45ed437d7e Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 13:08:34 +0200 Subject: [PATCH 02/21] remove unnecessary package from Dockerfile-debian installation Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index 38904b172..e63bd8c82 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -6,7 +6,7 @@ RUN if test -f /etc/apt/sources.list; then sed -i 's/http:\/\/security.debian.or RUN apt-get -qq update && \ apt-get -y --force-yes install \ - software-properties-common gnupg \ + gnupg \ ca-certificates-java default-jre-headless \ quilt debhelper dh-python From b2ac30ccd52e2abdc9f60a2973fe504278c1a1f3 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 13:10:31 +0200 Subject: [PATCH 03/21] remove --force-yes option from apt-get install commands in Dockerfile-debian Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index e63bd8c82..c009114e1 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -5,7 +5,7 @@ RUN if test -f /etc/apt/sources.list; then sed -i 's/http:\/\/security.debian.or RUN apt-get -qq update && \ - apt-get -y --force-yes install \ + apt-get -y install \ gnupg \ ca-certificates-java default-jre-headless \ quilt debhelper dh-python @@ -19,7 +19,7 @@ ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get -y install tzdata RUN apt-get -qq update && \ - apt-get -y --force-yes install \ + apt-get -y install \ quilt debhelper \ tree ne \ cmake \ From 09272f4adfff40e77946f984b2b45c264ae2c48d Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 18:03:53 +0200 Subject: [PATCH 04/21] fix: correct package name from libmongoclient-dev to libmongo-client-dev in Dockerfile-debian Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index c009114e1..2fb8c2fc6 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -33,7 +33,7 @@ RUN apt-get -qq update && \ libmetis-dev libscotch-dev \ libeigen3-dev \ petsc-dev \ - slepc-dev \ + slepc-dev \ libhdf5-openmpi-dev \ libnlopt-dev \ libgsl-dev \ @@ -49,7 +49,7 @@ RUN apt-get -qq update && \ libbz2-dev libzip-dev \ libbson-dev \ libmongoc-dev \ - libmongoclient-dev \ + libmongo-client-dev \ python3-pymongo \ ruby-progressbar \ ruby-tilt \ From f08093c520c67c4e2f85783984dc176b900b03af Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 18:07:10 +0200 Subject: [PATCH 05/21] fix: remove unnecessary doxygen-latex package from Dockerfile-debian Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index 2fb8c2fc6..cd7e1ab1c 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -42,7 +42,7 @@ RUN apt-get -qq update && \ libxml2-dev libpugixml-dev \ libgmsh-dev gmsh \ bison flex \ - doxygen doxygen-latex \ + doxygen \ transfig imagemagick \ libtbb-dev \ libann-dev libglpk-dev \ From 1cd2029aba213fbff8beafa4a69fb32483fdbc50 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Wed, 13 Aug 2025 23:47:55 +0200 Subject: [PATCH 06/21] fix: update APT sources configuration to use local mirror for Debian Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index cd7e1ab1c..3d9ec6862 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -1,7 +1,16 @@ -RUN if test -f /etc/apt/sources.list; then sed -i 's/http:\/\/deb.debian.org\/debian\//http:\/\/miroir.univ-lorraine.fr\/debian\//' /etc/apt/sources.list; fi -RUN if test -f /etc/apt/sources.list; then sed -i 's/http:\/\/security.debian.org\/debian-security\//http:\/\/miroir.univ-lorraine.fr\/debian-security\//' /etc/apt/sources.list; fi - - +# ARG DEBIAN_MAIN_MIRROR=ftp.fr.debian.org # override with --build-arg if needed +ARG DEBIAN_MAIN_MIRROR=miroir.univ-lorraine.fr +RUN set -e; \ + . /etc/os-release || true; \ + case "${ID}:${VERSION_CODENAME}" in \ + debian:bookworm|debian:trixie|debian:sid|debian:testing) \ + f=/etc/apt/sources.list.d/debian.sources; \ + echo "Switching main archive to http://${DEBIAN_MAIN_MIRROR}/debian (keeping security) in ${f}"; \ + sed -i "0,/^URIs:\s*http:\/\/deb\.debian\.org\/debian/s//URIs: http:\/\/${DEBIAN_MAIN_MIRROR}\/debian/" "$f"; \ + apt-get -qq update; \ + ;; \ + *) echo "Leaving APT sources untouched (ID=${ID} CODENAME=${VERSION_CODENAME}).";; \ + esac RUN apt-get -qq update && \ From b8329970b022ec86af2d6aa72ca250bda524409a Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 00:45:51 +0200 Subject: [PATCH 07/21] fix: update mkimg.sh to improve argument parsing and error handling Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- .github/workflows/feelpp-env.yml | 12 +-- feelpp-env/Dockerfile-debian-13 | 1 - feelpp-env/mkimg.sh | 164 ++++++++++++++----------------- 3 files changed, 81 insertions(+), 96 deletions(-) mode change 120000 => 100644 feelpp-env/Dockerfile-debian-13 diff --git a/.github/workflows/feelpp-env.yml b/.github/workflows/feelpp-env.yml index 1d46ce44e..97c49234d 100644 --- a/.github/workflows/feelpp-env.yml +++ b/.github/workflows/feelpp-env.yml @@ -76,9 +76,9 @@ jobs: submodules: recursive - name: generate run: | - bash mkimg.sh -f ${{ matrix.flavor }}:${{ matrix.version }} -t feelpp/${{ matrix.service }}:${{ matrix.tag }} -- - echo "context=feelpp-env/$(bash mkimg.sh -f ${{ matrix.flavor }}:${{ matrix.version }} -t feelpp/${{ matrix.service }}:${{ matrix.tag }} --)" >> $GITHUB_OUTPUT - ls -lrt + dir="$(bash mkimg.sh -f ${{ matrix.flavor }}:${{ matrix.version }} -t feelpp/${{ matrix.service }}:${{ matrix.tag }})" + echo "context=feelpp-env/${dir}" >> "$GITHUB_OUTPUT" + ls -lrt id: generate working-directory: feelpp-env - name: Set up QEMU @@ -122,9 +122,9 @@ jobs: submodules: recursive - name: generate run: | - bash mkimg.sh -f ${{ inputs.flavor }}:${{ inputs.version }} -t feelpp/${{ env.service }}:${{ env.tag }} -- - echo "context=feelpp-env/$(bash mkimg.sh -f ${{ inputs.flavor }}:${{ inputs.version }} -t feelpp/${{ env.service }}:${{ env.tag }} --)" >> $GITHUB_OUTPUT - ls -lrt + dir="$(bash mkimg.sh -f ${{ inputs.flavor }}:${{ inputs.version }} -t feelpp/${{ env.service }}:${{ env.tag }})" + echo "context=feelpp-env/${dir}" >> "$GITHUB_OUTPUT" + ls -lrt id: generate working-directory: feelpp-env - name: Set up QEMU diff --git a/feelpp-env/Dockerfile-debian-13 b/feelpp-env/Dockerfile-debian-13 deleted file mode 120000 index 4407bedc5..000000000 --- a/feelpp-env/Dockerfile-debian-13 +++ /dev/null @@ -1 +0,0 @@ -Dockerfile-debian \ No newline at end of file diff --git a/feelpp-env/Dockerfile-debian-13 b/feelpp-env/Dockerfile-debian-13 new file mode 100644 index 000000000..e69de29bb diff --git a/feelpp-env/mkimg.sh b/feelpp-env/mkimg.sh index 564797c5f..f25b0def8 100755 --- a/feelpp-env/mkimg.sh +++ b/feelpp-env/mkimg.sh @@ -1,53 +1,53 @@ -#!/bin/bash -set -e +#!/usr/bin/env bash +set -euo pipefail mkimg="$(basename "$0")" -from=debian:10 -cxx=clang++ -cc=clang -token= +from="debian:10" +cxx="clang++" +cc="clang" +token="" +install_altair="" +tag="" usage() { - echo >&2 "usage: $mkimg [-f fromos:fromtag] [-t tag] [-c c++ compiler] [-cc c compiler]" - echo >&2 " ie: $mkimg -f $from -t feelpp-env:19.10 -c clang++ -cc clang " - exit 1 + echo >&2 "usage: $mkimg [-f fromos:fromtag] [-t tag] [-c c++ compiler] [-cc c compiler] [-o token] [-a 0|1]" + echo >&2 " ex: $mkimg -f debian:13 -t feelpp-env:debian-13 -c clang++ -cc clang" + exit 1 } -fromos= -fromtag= -install_altair= - -tag= -while true; do - case "$1" in - -a|--altair) install_altair="$2" ; shift 2 ;; - -f|--from) from="$2" ; shift 2 ;; - -t|--tag) tag="$2" ; shift 2 ;; - -c|--cxx) cxx="$2" ; shift 2 ;; - -o|--token) token="$2" ; shift 2 ;; - -cc) cc="$2" ; shift 2 ;; - -h|--help) usage ;; - --) shift ; break ;; - esac +# ---- Parse args (no need for trailing --) ---- +while (($#)); do + case "$1" in + -a|--altair) install_altair="${2:-}"; shift 2 ;; + -f|--from) from="${2:-}"; shift 2 ;; + -t|--tag) tag="${2:-}"; shift 2 ;; + -c|--cxx) cxx="${2:-}"; shift 2 ;; + -cc) cc="${2:-}"; shift 2 ;; + -o|--token) token="${2:-}"; shift 2 ;; + -h|--help) usage ;; + --) shift; break ;; + *) echo "Unknown option: $1" >&2; usage ;; + esac done -splitfrom=(`echo "$from" | tr ":" "\n"`) -fromos=${splitfrom[0]} -fromtag=${splitfrom[1]} - -#echo >&2 "directory $fromos-$fromtag" -dir=$fromos-$fromtag-$cxx -if [ ! -d "$dir" ]; then - #(set -x; mkdir "$dir") - mkdir "$dir" +# ---- Split FROM into os:tag safely ---- +if [[ "$from" != *:* ]]; then + echo "ERROR: --from/-f must be of the form os:tag (got '$from')" >&2 + exit 1 fi - -#echo >&2 "+ cat > '$dir/Dockerfile'" -cat > "$dir/Dockerfile" < - +fromos="${from%%:*}" +fromtag="${from#*:}" + +# ---- Build directory ---- +dir="${fromos}-${fromtag}-${cxx}" +mkdir -p "$dir" + +# ---- Start Dockerfile ---- +{ + echo "FROM $from" + echo 'LABEL maintainer="Feel++ Support "' + cat < "$dir/Dockerfile" + +# ---- Concatenate optional fragments if present ---- +append_if_exists() { + local f="$1" + if [[ -f "$f" ]]; then + { cat "$f"; echo; } >> "$dir/Dockerfile" + fi +} -if test -f Dockerfile-$fromos; then - ( cat "Dockerfile-$fromos"; echo ) >> "$dir/Dockerfile" -fi -if test -f Dockerfile-$fromos-$fromtag; then - ( cat "Dockerfile-$fromos-$fromtag"; echo ) >> "$dir/Dockerfile" -fi +append_if_exists "Dockerfile-${fromos}" +append_if_exists "Dockerfile-${fromos}-${fromtag}" -if test $fromos != "fedora" -a $fromtag != "24.04"; then - if test -f Dockerfile-deb-om-$fromos-$fromtag; then - ( cat "Dockerfile-deb-om-$fromos-$fromtag"; echo ) >> "$dir/Dockerfile" - else - ( cat Dockerfile-deb-om; echo ) >> "$dir/Dockerfile" - fi +# Include OpenMPI / deb-om layer for all but Fedora and Ubuntu 24.04 +if [[ "$fromos" != "fedora" && "$fromtag" != "24.04" ]]; then + if [[ -f "Dockerfile-deb-om-${fromos}-${fromtag}" ]]; then + append_if_exists "Dockerfile-deb-om-${fromos}-${fromtag}" + else + append_if_exists "Dockerfile-deb-om" + fi fi -if test $fromtag = "20.04"; then - ( cat Dockerfile-cmake; echo ) >> "$dir/Dockerfile" +# CMake layer only for Ubuntu 20.04 (legacy) +if [[ "$fromtag" == "20.04" ]]; then + append_if_exists "Dockerfile-cmake" fi -#cat Dockerfile-openmpi >> "$dir/Dockerfile" - -#cat Dockerfile-boost >> "$dir/Dockerfile" - -#cat Dockerfile-petsc-slepc >> "$dir/Dockerfile" - -#if [ "x$install_altair" = "x1" ]; then -#cat Dockerfile-altair >> "$dir/Dockerfile" -#fi +append_if_exists "Dockerfile-${fromos}-buildkite" +append_if_exists "Dockerfile-feelpp" -#cat Dockerfile-paraview-$fromos-$fromtag >> "$dir/Dockerfile" +# Final ENV +echo 'ENV PATH=/usr/local/bin:$PATH' >> "$dir/Dockerfile" -#cat Dockerfile-deb-mongodb-$fromos-$fromtag >> "$dir/Dockerfile" - -#cat Dockerfile-openturns >> "$dir/Dockerfile" - -#cat Dockerfile-deb-sympy >> "$dir/Dockerfile" - -#cat Dockerfile-deb-mpi4py >> "$dir/Dockerfile" - -#cat Dockerfile-fmi >> "$dir/Dockerfile" - -( cat "Dockerfile-$fromos-buildkite"; echo ) >> "$dir/Dockerfile" - -( cat Dockerfile-feelpp; echo ) >> "$dir/Dockerfile" - -cat >> "$dir/Dockerfile" < Dockerfile: ${dir}/Dockerfile" >&2 +echo "$dir" \ No newline at end of file From 7dfdce35435524e434d741c2f3ebae92a2becab6 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 01:29:55 +0200 Subject: [PATCH 08/21] fix: exclude Debian 13 from OpenMPI layer inclusion in mkimg.sh Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/mkimg.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/feelpp-env/mkimg.sh b/feelpp-env/mkimg.sh index f25b0def8..ca6b2259d 100755 --- a/feelpp-env/mkimg.sh +++ b/feelpp-env/mkimg.sh @@ -76,7 +76,7 @@ append_if_exists "Dockerfile-${fromos}" append_if_exists "Dockerfile-${fromos}-${fromtag}" # Include OpenMPI / deb-om layer for all but Fedora and Ubuntu 24.04 -if [[ "$fromos" != "fedora" && "$fromtag" != "24.04" ]]; then +if [[ "$fromos" != "fedora" && "$fromtag" != "24.04" && "$fromtag" != "13" ]]; then if [[ -f "Dockerfile-deb-om-${fromos}-${fromtag}" ]]; then append_if_exists "Dockerfile-deb-om-${fromos}-${fromtag}" else @@ -89,7 +89,6 @@ if [[ "$fromtag" == "20.04" ]]; then append_if_exists "Dockerfile-cmake" fi -append_if_exists "Dockerfile-${fromos}-buildkite" append_if_exists "Dockerfile-feelpp" # Final ENV From ba1b1be5b3e49a449f82826be75e2600470d0056 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 02:04:26 +0200 Subject: [PATCH 09/21] fix: reorganize package installation in Dockerfile-debian and add missing dependencies Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index 3d9ec6862..40e1d1ed3 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -60,19 +60,26 @@ RUN apt-get -qq update && \ libmongoc-dev \ libmongo-client-dev \ python3-pymongo \ - ruby-progressbar \ - ruby-tilt \ - asciidoctor ruby-asciidoctor-pdf \ libglew-dev \ python3-h5py python3-sympy python3-mpi4py python3-numpy python3-petsc4py-real python3-slepc4py-real python3-venv \ rsync \ + gdb\ + && apt-get autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN apt-get -qq update && \ + apt-get -y --no-install-recommends -o APT::Install-Suggests=false install \ + ruby-progressbar \ + ruby-tilt \ + asciidoctor ruby-asciidoctor-pdf \ docker.io jsonlint \ man jq curl ruby ruby-dev \ - gdb\ && apt-get autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + ENV FEELPP_DEP_INSTALL_PREFIX /usr/local From 4c5f506655b13cbe5dc46c5fbd84e119ca3f7e1a Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 05:29:25 +0200 Subject: [PATCH 10/21] fix: revert ARG DEBIAN_MAIN_MIRROR to original value in Dockerfile-debian Add Debian Trixie/13 support to feelpp-env workflow Fixes #60 --- feelpp-env/Dockerfile-debian | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feelpp-env/Dockerfile-debian b/feelpp-env/Dockerfile-debian index 40e1d1ed3..b7c7b4a80 100644 --- a/feelpp-env/Dockerfile-debian +++ b/feelpp-env/Dockerfile-debian @@ -1,5 +1,5 @@ -# ARG DEBIAN_MAIN_MIRROR=ftp.fr.debian.org # override with --build-arg if needed -ARG DEBIAN_MAIN_MIRROR=miroir.univ-lorraine.fr +ARG DEBIAN_MAIN_MIRROR=ftp.fr.debian.org # override with --build-arg if needed +#ARG DEBIAN_MAIN_MIRROR=miroir.univ-lorraine.fr RUN set -e; \ . /etc/os-release || true; \ case "${ID}:${VERSION_CODENAME}" in \ From 4a7abc4817dbe3a16148dd9777dc2b8c611269ba Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 06:03:50 +0200 Subject: [PATCH 11/21] fix: update feelpp-env.yml for Ubuntu 24.04 and Fedora 42 support Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- .github/workflows/feelpp-env.yml | 10 +++---- feelpp-env/Dockerfile-fedora | 47 ++++++++++++++++---------------- feelpp-env/Dockerfile-fedora-42 | 3 ++ 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 feelpp-env/Dockerfile-fedora-42 diff --git a/.github/workflows/feelpp-env.yml b/.github/workflows/feelpp-env.yml index 97c49234d..7022eb05d 100644 --- a/.github/workflows/feelpp-env.yml +++ b/.github/workflows/feelpp-env.yml @@ -12,7 +12,7 @@ on: dist: description: 'Distribution codename' required: true - default: 'jammy' + default: 'noble' type: string flavor: description: 'Flavor of the distribution' @@ -22,7 +22,7 @@ on: version: description: 'Version of the distribution' required: true - default: '22.04' + default: '24.04' type: string dockerfile: description: 'Dockerfile to use' @@ -53,8 +53,8 @@ jobs: max-parallel: 4 matrix: include: - - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } # - {service: feelpp-env, dist: buster, flavor: debian, version: "10", tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } @@ -63,7 +63,7 @@ jobs: - {service: feelpp-env, dist: trixie, flavor: debian, version: "13", tag: debian-13, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: fedora-42, flavor: fedora, version: "42", tag: fedora-42, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } runs-on: self-docker needs: activate name: ${{ matrix.flavor }}-${{ matrix.version }} diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index cbcf7d578..0261ac040 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -1,23 +1,24 @@ - - -RUN dnf install -y redhat-lsb-core sudo emacs-nox clang cmake git ruby libcurl-devel jq\ - cln-devel \ - openmpi-devel \ - python3-devel \ - boost-devel boost-openmpi-devel \ - MUMPS-openmpi-devel metis-devel \ - petsc-devel petsc-openmpi-devel python3-petsc-openmpi \ - gmsh gmsh-devel hdf5-openmpi-devel \ - libzip-devel openssl-devel\ - python3-mpi4py-openmpi python3-sympy \ - curl jq openssl-devel libffi-devel python3 python3-virtualenv python3-devel python3-pip nodejs \ - sudo \ - && dnf clean all \ - && echo ". /etc/profile.d/modules.sh" >> /etc/profile \ - && echo "module load mpi/openmpi-x86_64" >> /etc/profile - - - - - - +RUN set -eux; \ + dnf -y update; \ + dnf -y install \ + sudo emacs-nox clang cmake git ruby \ + libcurl-devel jq cln-devel \ + openmpi-devel environment-modules \ + python3 python3-devel python3-pip python3-virtualenv \ + boost-devel boost-openmpi-devel \ + MUMPS-openmpi-devel metis-devel \ + petsc-devel petsc-openmpi-devel python3-petsc-openmpi \ + gmsh gmsh-devel hdf5-openmpi-devel \ + libzip-devel openssl-devel libffi-devel \ + python3-mpi4py-openmpi python3-sympy nodejs \ + --setopt=install_weak_deps=False \ + --best --allowerasing; \ + dnf clean all; \ + rm -rf /var/cache/dnf; \ + # enable Modules and preload OpenMPI module in interactive shells + if [ -f /etc/profile.d/modules.sh ]; then \ + echo ". /etc/profile.d/modules.sh" >> /etc/profile; \ + elif [ -f /usr/share/Modules/init/bash ]; then \ + echo "source /usr/share/Modules/init/bash" >> /etc/profile; \ + fi; \ + echo "module load mpi/openmpi-x86_64" >> /etc/profile \ No newline at end of file diff --git a/feelpp-env/Dockerfile-fedora-42 b/feelpp-env/Dockerfile-fedora-42 new file mode 100644 index 000000000..04c0ae430 --- /dev/null +++ b/feelpp-env/Dockerfile-fedora-42 @@ -0,0 +1,3 @@ +# create docker group to avoid failure later +# docker is not yet supported in fedora-37 +RUN groupadd docker From d06e317c3732241e82a497326336bc827c92774c Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 14 Aug 2025 06:58:21 +0200 Subject: [PATCH 12/21] fix: correct platform specifications for Ubuntu 22.04 and Debian 12 in feelpp-env.yml use arm64 only latest stable --- .github/workflows/feelpp-env.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/feelpp-env.yml b/.github/workflows/feelpp-env.yml index 7022eb05d..424606e41 100644 --- a/.github/workflows/feelpp-env.yml +++ b/.github/workflows/feelpp-env.yml @@ -55,11 +55,11 @@ jobs: include: # - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } # - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } # - {service: feelpp-env, dist: buster, flavor: debian, version: "10", tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } # - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } - {service: feelpp-env, dist: trixie, flavor: debian, version: "13", tag: debian-13, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } From 75b0d2e5fe206f791657d936e77953593b2044f9 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Fri, 15 Aug 2025 10:15:34 +0200 Subject: [PATCH 13/21] fix: update Dockerfile-fedora to ensure OpenMPI module loads correctly and set environment variable Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 0261ac040..69af43dce 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -21,4 +21,9 @@ RUN set -eux; \ elif [ -f /usr/share/Modules/init/bash ]; then \ echo "source /usr/share/Modules/init/bash" >> /etc/profile; \ fi; \ - echo "module load mpi/openmpi-x86_64" >> /etc/profile \ No newline at end of file + echo "module load mpi/openmpi-x86_64" >> /etc/bashrc + +ENV OMPI_MCA_btl_vader_single_copy_mechanism=none + + + From fe0c62f9c364dd0abcfe044e9c2255dc665ecde7 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Fri, 15 Aug 2025 10:55:44 +0200 Subject: [PATCH 14/21] fix: add missing 'tree' package to Dockerfile-fedora installation Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 69af43dce..2e2dbec59 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -1,7 +1,7 @@ RUN set -eux; \ dnf -y update; \ dnf -y install \ - sudo emacs-nox clang cmake git ruby \ + sudo emacs-nox clang cmake git ruby tree\ libcurl-devel jq cln-devel \ openmpi-devel environment-modules \ python3 python3-devel python3-pip python3-virtualenv \ From 9490dcc399478f997a23e51abe69be8469c62fd3 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Fri, 15 Aug 2025 11:43:54 +0200 Subject: [PATCH 15/21] fix: add missing 'lsb_release' and 'pugixml-devel' packages to Dockerfile-fedora installation Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 2e2dbec59..fbf362b33 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -1,7 +1,7 @@ RUN set -eux; \ dnf -y update; \ dnf -y install \ - sudo emacs-nox clang cmake git ruby tree\ + sudo emacs-nox clang cmake git ruby tree lsb_release ninja\ libcurl-devel jq cln-devel \ openmpi-devel environment-modules \ python3 python3-devel python3-pip python3-virtualenv \ @@ -10,7 +10,7 @@ RUN set -eux; \ petsc-devel petsc-openmpi-devel python3-petsc-openmpi \ gmsh gmsh-devel hdf5-openmpi-devel \ libzip-devel openssl-devel libffi-devel \ - python3-mpi4py-openmpi python3-sympy nodejs \ + python3-mpi4py-openmpi python3-sympy nodejs pugixml-devel \ --setopt=install_weak_deps=False \ --best --allowerasing; \ dnf clean all; \ From eccab3b9ae411d6f47f7862fa6b04169930458f7 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sat, 16 Aug 2025 23:58:39 +0200 Subject: [PATCH 16/21] fix: update Dockerfile-fedora to enhance OpenMPI setup and include additional packages Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 99 ++++++++++++++++++++++++++++++------ 1 file changed, 83 insertions(+), 16 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index fbf362b33..0c063f595 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -1,29 +1,96 @@ +# --- BuildKit auto platform args (injected by buildx) --- +ARG TARGETPLATFORM +ARG TARGETARCH +ARG TARGETOS + +# --- Useful env defaults (baked per-arch) --- +ENV DISTRIBUTION=auto \ + ARCH=${TARGETARCH} \ + FEELPP_DEP_INSTALL_PREFIX=/usr/local \ + OMPI_ALLOW_RUN_AS_ROOT=1 \ + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \ + OMPI_MCA_btl_vader_single_copy_mechanism=none \ + DNF_YUM_BACKEND=dnf5 + +# -------- System setup -------- RUN set -eux; \ dnf -y update; \ dnf -y install \ - sudo emacs-nox clang cmake git ruby tree lsb_release ninja\ - libcurl-devel jq cln-devel \ - openmpi-devel environment-modules \ - python3 python3-devel python3-pip python3-virtualenv \ + sudo which tree ninja-build \ + clang cmake git ruby jq curl \ + environment-modules openmpi openmpi-devel \ + python3 python3-devel python3-pip python3-virtualenv python3-sympy \ + python3-mpi4py-openmpi \ boost-devel boost-openmpi-devel \ MUMPS-openmpi-devel metis-devel \ petsc-devel petsc-openmpi-devel python3-petsc-openmpi \ - gmsh gmsh-devel hdf5-openmpi-devel \ - libzip-devel openssl-devel libffi-devel \ - python3-mpi4py-openmpi python3-sympy nodejs pugixml-devel \ + gmsh gmsh-devel hdf5-openmpi-devel libzip-devel pugixml-devel \ + openssl-devel libffi-devel \ + lsof procps-ng findutils file \ + nodejs \ --setopt=install_weak_deps=False \ --best --allowerasing; \ + dnf -y install redhat-lsb-core || dnf -y install redhat-lsb || true; \ dnf clean all; \ - rm -rf /var/cache/dnf; \ - # enable Modules and preload OpenMPI module in interactive shells - if [ -f /etc/profile.d/modules.sh ]; then \ - echo ". /etc/profile.d/modules.sh" >> /etc/profile; \ - elif [ -f /usr/share/Modules/init/bash ]; then \ - echo "source /usr/share/Modules/init/bash" >> /etc/profile; \ - fi; \ - echo "module load mpi/openmpi-x86_64" >> /etc/bashrc + rm -rf /var/cache/dnf + +# -------- Shell environment (part 1): /etc/profile.d helper -------- +RUN set -eux; \ + cat >/etc/profile.d/00-feelpp-env.sh <<'EOF' +# Feel++ base environment +# Source environment-modules (Modules or Lmod) if present +if [ -f /etc/profile.d/modules.sh ]; then + . /etc/profile.d/modules.sh +elif [ -f /usr/share/Modules/init/bash ]; then + . /usr/share/Modules/init/bash +fi -ENV OMPI_MCA_btl_vader_single_copy_mechanism=none +# Load OpenMPI module when interactive +case "$-" in + *i*) + module -q load mpi/openmpi-x86_64 2>/dev/null || true + ;; +esac +# Compute DISTRIBUTION if set to 'auto' +if [ "${DISTRIBUTION:-auto}" = "auto" ] && [ -r /etc/os-release ]; then + . /etc/os-release + if [ -n "${ID:-}" ] && [ -n "${VERSION_ID:-}" ]; then + export DISTRIBUTION="${ID}${VERSION_ID}" + fi +fi +# Ensure OpenMPI tools are visible even without modules for non-interactive scripts +if ! command -v mpicc >/dev/null 2>&1; then + if [ -d /usr/lib64/openmpi/bin ]; then + export PATH="/usr/lib64/openmpi/bin:${PATH}" + fi + if [ -d /usr/lib64/openmpi/lib ]; then + export LD_LIBRARY_PATH="/usr/lib64/openmpi/lib:${LD_LIBRARY_PATH:-}" + fi +fi +EOF + +# -------- Shell environment (part 2): /etc/bashrc tweaks -------- +RUN set -eux; \ + # Enable environment-modules in interactive bash + if ! grep -q 'Modules/init' /etc/bashrc 2>/dev/null && \ + ! grep -q '/etc/profile.d/modules.sh' /etc/bashrc 2>/dev/null; then \ + printf '\n# Enable environment-modules for interactive bash\n' >> /etc/bashrc; \ + printf '[ -f /etc/profile.d/modules.sh ] && . /etc/profile.d/modules.sh || true\n' >> /etc/bashrc; \ + fi; \ + # Auto-load the OpenMPI module for interactive bash + if ! grep -q 'module -q load mpi/openmpi-x86_64' /etc/bashrc 2>/dev/null; then \ + printf 'case "$-" in *i*) module -q load mpi/openmpi-x86_64 2>/dev/null || true;; esac\n' >> /etc/bashrc; \ + fi + +# -------- Quick sanity hints -------- +RUN set -eux; \ + echo; echo "=== OpenMPI sanity (non-fatal) ==="; \ + bash -lc 'type module >/dev/null 2>&1 && module -q load mpi/openmpi-x86_64 || true'; \ + bash -lc 'command -v mpicc && mpicc --version | head -n1 || true'; \ + bash -lc 'command -v mpirun && mpirun --version | head -n1 || true'; \ + echo "==================================="; echo +# Keep PATH nice +ENV PATH=/usr/local/bin:${PATH} \ No newline at end of file From 282b17d3895c2244ab245f43e0fc7650825a9527 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 17 Aug 2025 01:43:46 +0200 Subject: [PATCH 17/21] fix: correct OpenMPI module loading command in Dockerfile-fedora Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 0c063f595..0aaed1252 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -48,7 +48,7 @@ fi # Load OpenMPI module when interactive case "$-" in *i*) - module -q load mpi/openmpi-x86_64 2>/dev/null || true + module load mpi/openmpi-x86_64 2>/dev/null || true ;; esac @@ -80,14 +80,14 @@ RUN set -eux; \ printf '[ -f /etc/profile.d/modules.sh ] && . /etc/profile.d/modules.sh || true\n' >> /etc/bashrc; \ fi; \ # Auto-load the OpenMPI module for interactive bash - if ! grep -q 'module -q load mpi/openmpi-x86_64' /etc/bashrc 2>/dev/null; then \ - printf 'case "$-" in *i*) module -q load mpi/openmpi-x86_64 2>/dev/null || true;; esac\n' >> /etc/bashrc; \ + if ! grep -q 'module load mpi/openmpi-x86_64' /etc/bashrc 2>/dev/null; then \ + printf 'case "$-" in *i*) module load mpi/openmpi-x86_64 2>/dev/null || true;; esac\n' >> /etc/bashrc; \ fi # -------- Quick sanity hints -------- RUN set -eux; \ echo; echo "=== OpenMPI sanity (non-fatal) ==="; \ - bash -lc 'type module >/dev/null 2>&1 && module -q load mpi/openmpi-x86_64 || true'; \ + bash -lc 'type module >/dev/null 2>&1 && module load mpi/openmpi-x86_64 || true'; \ bash -lc 'command -v mpicc && mpicc --version | head -n1 || true'; \ bash -lc 'command -v mpirun && mpirun --version | head -n1 || true'; \ echo "==================================="; echo From 057b461810783a8b4044d348c20bbbb6c366af3a Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 17 Aug 2025 17:14:02 +0200 Subject: [PATCH 18/21] fix: reorganize OpenMPI environment variables and improve module loading in Dockerfile-fedora Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 82 ++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 0aaed1252..d8ce355eb 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -7,12 +7,12 @@ ARG TARGETOS ENV DISTRIBUTION=auto \ ARCH=${TARGETARCH} \ FEELPP_DEP_INSTALL_PREFIX=/usr/local \ - OMPI_ALLOW_RUN_AS_ROOT=1 \ - OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \ - OMPI_MCA_btl_vader_single_copy_mechanism=none \ DNF_YUM_BACKEND=dnf5 # -------- System setup -------- +# Use bash -l for subsequent RUNs so /etc/profile.d gets sourced when needed +SHELL ["/bin/bash", "-l", "-c"] + RUN set -eux; \ dnf -y update; \ dnf -y install \ @@ -34,10 +34,54 @@ RUN set -eux; \ dnf clean all; \ rm -rf /var/cache/dnf -# -------- Shell environment (part 1): /etc/profile.d helper -------- +# ---------------------------------------------------------------------------------- +# Open MPI Configuration +# +# The following environment variables configure how Open MPI operates within the container: +# +# 1. OMPI_MCA_pml: +# - Defines the point-to-point messaging layer. +# - Setting to "ob1" selects the basic, yet versatile, messaging layer. +# +# 2. OMPI_MCA_btl: +# - Specifies the Byte Transfer Layers (BTLs) for data movement. +# - "self,vader" enables both the self and vader BTLs. The "self" BTL handles +# loopback communication while "vader" is optimized for intranode communication. +# +# 3. OMPI_MCA_mtl: +# - Controls the Message Transfer Layers (MTLs). +# - The value "^ofi,psm2" disables the "ofi" and "psm2" modules to avoid conflicts +# and potentially enforce the use of the selected PML/BTL configuration. +# +# 4. OMPI_MCA_btl_vader_single_copy_mechanism: +# - Determines the mechanism used by the vader BTL for single-copy operations. +# - The "cma" value enforces the use of Cross Memory Attach (CMA) for efficient memory copying. +# +# These settings are chosen to optimize performance and ensure compatibility +# within the containerized environment based on Fedora. +# ---------------------------------------------------------------------------------- +ENV OMPI_MCA_pml=ob1 \ + OMPI_MCA_btl=self,vader \ + OMPI_MCA_mtl=^ofi,psm2 \ + OMPI_MCA_btl_vader_single_copy_mechanism=cma + +# allow mpi as root +ENV OMPI_ALLOW_RUN_AS_ROOT=1 \ + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 + +# --- Make OpenMPI globally visible in ALL contexts (non-interactive builds, CI, etc.) +ENV PATH="/usr/lib64/openmpi/bin:${PATH}" +ENV LD_LIBRARY_PATH="/usr/lib64/openmpi/lib:${LD_LIBRARY_PATH}" + +# -------- Shell environment helper: /etc/profile.d -------- +# - Source environment-modules if present +# - Load OpenMPI module whenever 'module' exists (not only interactive shells) +# - Compute DISTRIBUTION when set to 'auto' +# - Leave PATH/LD_LIBRARY_PATH as-is (already set above); keep fallback just in case RUN set -eux; \ cat >/etc/profile.d/00-feelpp-env.sh <<'EOF' # Feel++ base environment + # Source environment-modules (Modules or Lmod) if present if [ -f /etc/profile.d/modules.sh ]; then . /etc/profile.d/modules.sh @@ -45,12 +89,10 @@ elif [ -f /usr/share/Modules/init/bash ]; then . /usr/share/Modules/init/bash fi -# Load OpenMPI module when interactive -case "$-" in - *i*) - module load mpi/openmpi-x86_64 2>/dev/null || true - ;; -esac +# Load OpenMPI module whenever modules are available (non-fatal) +if type module >/dev/null 2>&1; then + module load mpi/openmpi-x86_64 2>/dev/null || true +fi # Compute DISTRIBUTION if set to 'auto' if [ "${DISTRIBUTION:-auto}" = "auto" ] && [ -r /etc/os-release ]; then @@ -60,7 +102,7 @@ if [ "${DISTRIBUTION:-auto}" = "auto" ] && [ -r /etc/os-release ]; then fi fi -# Ensure OpenMPI tools are visible even without modules for non-interactive scripts +# Fallback: ensure OpenMPI tools are visible even if modules weren't sourced if ! command -v mpicc >/dev/null 2>&1; then if [ -d /usr/lib64/openmpi/bin ]; then export PATH="/usr/lib64/openmpi/bin:${PATH}" @@ -71,25 +113,19 @@ if ! command -v mpicc >/dev/null 2>&1; then fi EOF -# -------- Shell environment (part 2): /etc/bashrc tweaks -------- +# -------- Optional: enable environment-modules in interactive bash -------- RUN set -eux; \ - # Enable environment-modules in interactive bash - if ! grep -q 'Modules/init' /etc/bashrc 2>/dev/null && \ - ! grep -q '/etc/profile.d/modules.sh' /etc/bashrc 2>/dev/null; then \ + if ! grep -q '/etc/profile.d/modules.sh' /etc/bashrc 2>/dev/null; then \ printf '\n# Enable environment-modules for interactive bash\n' >> /etc/bashrc; \ printf '[ -f /etc/profile.d/modules.sh ] && . /etc/profile.d/modules.sh || true\n' >> /etc/bashrc; \ - fi; \ - # Auto-load the OpenMPI module for interactive bash - if ! grep -q 'module load mpi/openmpi-x86_64' /etc/bashrc 2>/dev/null; then \ - printf 'case "$-" in *i*) module load mpi/openmpi-x86_64 2>/dev/null || true;; esac\n' >> /etc/bashrc; \ fi -# -------- Quick sanity hints -------- +# -------- Quick sanity checks (non-fatal) -------- RUN set -eux; \ echo; echo "=== OpenMPI sanity (non-fatal) ==="; \ - bash -lc 'type module >/dev/null 2>&1 && module load mpi/openmpi-x86_64 || true'; \ - bash -lc 'command -v mpicc && mpicc --version | head -n1 || true'; \ - bash -lc 'command -v mpirun && mpirun --version | head -n1 || true'; \ + command -v mpicc && mpicc --version | head -n1 || true; \ + command -v mpirun && mpirun --version | head -n1 || true; \ + type module >/dev/null 2>&1 && module avail 2>/dev/null | head -n20 || true; \ echo "==================================="; echo # Keep PATH nice From a545f66b232877137430e17c6df1574be95361ff Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 17 Aug 2025 21:38:53 +0200 Subject: [PATCH 19/21] fix: modify ARCH and DISTRIBUTION variables in Dockerfile-fedora for improved compatibility Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index d8ce355eb..e3e0896d7 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -5,7 +5,7 @@ ARG TARGETOS # --- Useful env defaults (baked per-arch) --- ENV DISTRIBUTION=auto \ - ARCH=${TARGETARCH} \ + ARCH=-${TARGETARCH} \ FEELPP_DEP_INSTALL_PREFIX=/usr/local \ DNF_YUM_BACKEND=dnf5 @@ -25,6 +25,7 @@ RUN set -eux; \ MUMPS-openmpi-devel metis-devel \ petsc-devel petsc-openmpi-devel python3-petsc-openmpi \ gmsh gmsh-devel hdf5-openmpi-devel libzip-devel pugixml-devel \ + libcurl-devel cln-devel \ openssl-devel libffi-devel \ lsof procps-ng findutils file \ nodejs \ @@ -98,7 +99,7 @@ fi if [ "${DISTRIBUTION:-auto}" = "auto" ] && [ -r /etc/os-release ]; then . /etc/os-release if [ -n "${ID:-}" ] && [ -n "${VERSION_ID:-}" ]; then - export DISTRIBUTION="${ID}${VERSION_ID}" + export DISTRIBUTION="-${ID}${VERSION_ID}" fi fi From 068ca6e6522c1abdd409583878439cac23a2632c Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Sun, 17 Aug 2025 23:21:13 +0200 Subject: [PATCH 20/21] fix: remove DISTRIBUTION and ARCH variables from Dockerfile-fedora for simplification Update Feel++ Env Fedora image to Fedora 42 Fixes #62 --- feelpp-env/Dockerfile-fedora | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index e3e0896d7..4a3583a4c 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -4,9 +4,7 @@ ARG TARGETARCH ARG TARGETOS # --- Useful env defaults (baked per-arch) --- -ENV DISTRIBUTION=auto \ - ARCH=-${TARGETARCH} \ - FEELPP_DEP_INSTALL_PREFIX=/usr/local \ +ENV FEELPP_DEP_INSTALL_PREFIX=/usr/local \ DNF_YUM_BACKEND=dnf5 # -------- System setup -------- @@ -77,7 +75,6 @@ ENV LD_LIBRARY_PATH="/usr/lib64/openmpi/lib:${LD_LIBRARY_PATH}" # -------- Shell environment helper: /etc/profile.d -------- # - Source environment-modules if present # - Load OpenMPI module whenever 'module' exists (not only interactive shells) -# - Compute DISTRIBUTION when set to 'auto' # - Leave PATH/LD_LIBRARY_PATH as-is (already set above); keep fallback just in case RUN set -eux; \ cat >/etc/profile.d/00-feelpp-env.sh <<'EOF' @@ -95,14 +92,6 @@ if type module >/dev/null 2>&1; then module load mpi/openmpi-x86_64 2>/dev/null || true fi -# Compute DISTRIBUTION if set to 'auto' -if [ "${DISTRIBUTION:-auto}" = "auto" ] && [ -r /etc/os-release ]; then - . /etc/os-release - if [ -n "${ID:-}" ] && [ -n "${VERSION_ID:-}" ]; then - export DISTRIBUTION="-${ID}${VERSION_ID}" - fi -fi - # Fallback: ensure OpenMPI tools are visible even if modules weren't sourced if ! command -v mpicc >/dev/null 2>&1; then if [ -d /usr/lib64/openmpi/bin ]; then From c444fa045a4c760bb3a4fcb529b5ceb96dc09d83 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 21 Aug 2025 08:30:34 +0200 Subject: [PATCH 21/21] fix: add rsync to package installation in Dockerfile-fedora for enhanced functionality --- feelpp-env/Dockerfile-fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feelpp-env/Dockerfile-fedora b/feelpp-env/Dockerfile-fedora index 4a3583a4c..0f2d90d10 100644 --- a/feelpp-env/Dockerfile-fedora +++ b/feelpp-env/Dockerfile-fedora @@ -15,7 +15,7 @@ RUN set -eux; \ dnf -y update; \ dnf -y install \ sudo which tree ninja-build \ - clang cmake git ruby jq curl \ + clang cmake git ruby rubygem-bundler jq curl rsync \ environment-modules openmpi openmpi-devel \ python3 python3-devel python3-pip python3-virtualenv python3-sympy \ python3-mpi4py-openmpi \