From 3c6e5ddb65881823f1d40749715d46ff156b61d1 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 19:02:56 -0400 Subject: [PATCH 1/7] fix: split CPU docker build into native amd64/arm64 jobs to prevent 6h timeout The CPU container job was using QEMU to cross-compile linux/arm64 on a single x86 runner, consistently hitting the 6-hour GitHub Actions limit. All recent releases (v5.1.3 through v5.3.1) failed to publish latest-cpu. Fix: split into two native jobs (ubuntu-22.04 and ubuntu-22.04-arm), mirroring the existing GPU build pattern. Remove QEMU. Merge into a multi-arch manifest in the manifests job using buildx imagetools. Also: add weekly schedule trigger (Sunday midnight UTC) so the devcontainer image stays fresh between releases, and bump build-push-action to v6. --- .github/workflows/docker.yml | 43 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e905aae794..a0b247e64c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,11 +3,13 @@ name: Containerization on: release: types: [published] + schedule: + - cron: '0 0 * * 0' workflow_dispatch: inputs: tag: description: 'tag to containerize' - required: true + required: false concurrency: group: Containerization @@ -18,9 +20,10 @@ jobs: strategy: matrix: config: - - { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } + - { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' } + - { name: 'cpu', runner: 'ubuntu-22.04-arm', base_image: 'ubuntu:22.04' } + - { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } + - { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } runs-on: ${{ matrix.config.runner }} outputs: tag: ${{ steps.clone.outputs.tag }} @@ -45,16 +48,19 @@ jobs: - name: Setup Buildx uses: docker/setup-buildx-action@v3 - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - name: Clone id: clone run: | - TAG="${{ github.event.inputs.tag || github.ref_name }}" + if [ "${{ github.event_name }}" = "schedule" ]; then + BRANCH="master" + TAG="nightly" + else + BRANCH="${{ github.event.inputs.tag || github.ref_name }}" + TAG="$BRANCH" + fi echo "tag=$TAG" >> $GITHUB_OUTPUT echo "TAG=$TAG" >> $GITHUB_ENV - git clone --branch "$TAG" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc + git clone --branch "$BRANCH" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc - name: Stage run: | @@ -71,16 +77,13 @@ jobs: cp -r mfc/.git /mnt/share/.git cp mfc/.github/Dockerfile /mnt/share/ cp mfc/.github/.dockerignore /mnt/share/ - docker buildx create --name mfcbuilder --driver docker-container --use - name: Build and push image (cpu) if: ${{ matrix.config.name == 'cpu' }} uses: docker/build-push-action@v6 with: - builder: mfcbuilder context: /mnt/share file: /mnt/share/Dockerfile - platforms: linux/amd64,linux/arm64 build-args: | BASE_IMAGE=${{ matrix.config.base_image }} TARGET=${{ matrix.config.name }} @@ -89,12 +92,12 @@ jobs: FC_COMPILER=${{ 'gfortran' }} COMPILER_PATH=${{ '/usr/bin' }} COMPILER_LD_LIBRARY_PATH=${{ '/usr/lib' }} - tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }} + tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }} push: true - name: Build and push image (gpu) if: ${{ matrix.config.name == 'gpu' }} - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: builder: default context: /mnt/share @@ -120,13 +123,15 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Setup Buildx + uses: docker/setup-buildx-action@v3 + - name: Create and Push Manifest Lists env: TAG: ${{ needs.Container.outputs.tag }} REGISTRY: ${{ secrets.DOCKERHUB_USERNAME }}/mfc run: | - docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu - docker manifest create $REGISTRY:$TAG-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm - docker manifest create $REGISTRY:latest-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm - docker manifest push $REGISTRY:$TAG-gpu - docker manifest push $REGISTRY:latest-gpu \ No newline at end of file + docker buildx imagetools create -t $REGISTRY:$TAG-cpu $REGISTRY:$TAG-cpu-ubuntu-22.04 $REGISTRY:$TAG-cpu-ubuntu-22.04-arm + docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu-ubuntu-22.04 $REGISTRY:$TAG-cpu-ubuntu-22.04-arm + docker buildx imagetools create -t $REGISTRY:$TAG-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm + docker buildx imagetools create -t $REGISTRY:latest-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm From a76387df56242043f7d273d62536442bc924b3c0 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 20:39:07 -0400 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20sanitize=20Docker=20tag=20=E2=80=94?= =?UTF-8?q?=20replace=20slashes=20in=20branch=20names=20with=20dashes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a0b247e64c..5bcdaa0b21 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,7 +56,7 @@ jobs: TAG="nightly" else BRANCH="${{ github.event.inputs.tag || github.ref_name }}" - TAG="$BRANCH" + TAG=$(echo "$BRANCH" | tr '/' '-') fi echo "tag=$TAG" >> $GITHUB_OUTPUT echo "TAG=$TAG" >> $GITHUB_ENV From 8f3e35728144c1d80ceb140d5642f8566cda0d5f Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 21:03:42 -0400 Subject: [PATCH 3/7] fix: only update latest-cpu/gpu tags on release, not on nightly schedule --- .github/workflows/docker.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5bcdaa0b21..9322919957 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -132,6 +132,13 @@ jobs: REGISTRY: ${{ secrets.DOCKERHUB_USERNAME }}/mfc run: | docker buildx imagetools create -t $REGISTRY:$TAG-cpu $REGISTRY:$TAG-cpu-ubuntu-22.04 $REGISTRY:$TAG-cpu-ubuntu-22.04-arm - docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu-ubuntu-22.04 $REGISTRY:$TAG-cpu-ubuntu-22.04-arm docker buildx imagetools create -t $REGISTRY:$TAG-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm + + - name: Update latest tags + if: github.event_name == 'release' + env: + TAG: ${{ needs.Container.outputs.tag }} + REGISTRY: ${{ secrets.DOCKERHUB_USERNAME }}/mfc + run: | + docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu-ubuntu-22.04 $REGISTRY:$TAG-cpu-ubuntu-22.04-arm docker buildx imagetools create -t $REGISTRY:latest-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm From a3e55a94687e9b69397feaed784cdf7c21c0f0cb Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 22:33:57 -0400 Subject: [PATCH 4/7] fix: set DEBIAN_FRONTEND=noninteractive to prevent tzdata prompt hanging Docker build --- .github/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/Dockerfile b/.github/Dockerfile index 5b86e0f711..dfc61162ca 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -8,6 +8,9 @@ ARG FC_COMPILER ARG COMPILER_PATH ARG COMPILER_LD_LIBRARY_PATH +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=UTC + RUN apt-get update -y && \ apt-get install -y software-properties-common ca-certificates gnupg && \ add-apt-repository ppa:deadsnakes/ppa && \ From 6a012f8a78ad81aa42d49b7d9dc67d0a2e6a3c98 Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 23:13:58 -0400 Subject: [PATCH 5/7] revert: use build-push-action@v5 for GPU jobs (v6 causes SIGTERM in dry-run) --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9322919957..1a6fc037fe 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -97,7 +97,7 @@ jobs: - name: Build and push image (gpu) if: ${{ matrix.config.name == 'gpu' }} - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v5 with: builder: default context: /mnt/share From 003ed3e36e27e180dd75dbff174f1f8ae241489c Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 23:30:07 -0400 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20upgrade=20NVHPC=2023.11=E2=86=9224.5?= =?UTF-8?q?=20and=20fix=20ARM=20compiler=20path=20for=20GPU=20Docker=20bui?= =?UTF-8?q?lds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1a6fc037fe..fab7b0a15f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,8 +22,8 @@ jobs: config: - { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' } - { name: 'cpu', runner: 'ubuntu-22.04-arm', base_image: 'ubuntu:22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } + - { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:24.5-devel-cuda_multi-ubuntu22.04', compiler_arch: 'Linux_x86_64' } + - { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:24.5-devel-cuda_multi-ubuntu22.04', compiler_arch: 'Linux_aarch64' } runs-on: ${{ matrix.config.runner }} outputs: tag: ${{ steps.clone.outputs.tag }} @@ -108,8 +108,8 @@ jobs: CC_COMPILER=${{ 'nvc' }} CXX_COMPILER=${{ 'nvc++' }} FC_COMPILER=${{ 'nvfortran' }} - COMPILER_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/bin' }} - COMPILER_LD_LIBRARY_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/lib' }} + COMPILER_PATH=/opt/nvidia/hpc_sdk/${{ matrix.config.compiler_arch }}/compilers/bin + COMPILER_LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/${{ matrix.config.compiler_arch }}/compilers/lib tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner}} push: true From 6e3e7051783a94e11080e12e1c29c2d73f92bf4a Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sun, 10 May 2026 23:31:13 -0400 Subject: [PATCH 7/7] fix: pass --gpu acc to build and test in GPU Dockerfile (nvfortran uses OpenACC) --- .github/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index dfc61162ca..64cb15e9f3 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -53,14 +53,14 @@ RUN python3.12 -m venv /opt/MFC/build/venv && \ RUN echo "TARGET=$TARGET CC=$CC_COMPILER FC=$FC_COMPILER" && \ cd /opt/MFC && \ if [ "$TARGET" = "gpu" ]; then \ - ./mfc.sh build --gpu -j $(nproc); \ + ./mfc.sh build --gpu acc -j $(nproc); \ else \ ./mfc.sh build -j $(nproc); \ fi RUN cd /opt/MFC && \ if [ "$TARGET" = "gpu" ]; then \ - ./mfc.sh test -a --dry-run --gpu -j $(nproc); \ + ./mfc.sh test -a --dry-run --gpu acc -j $(nproc); \ else \ ./mfc.sh test -a --dry-run -j $(nproc); \ fi