Skip to content

Commit 9234287

Browse files
committed
Updated image and CI workflow for SPH-EXA
1 parent 05591a6 commit 9234287

File tree

5 files changed

+123
-137
lines changed

5 files changed

+123
-137
lines changed

.github/workflows/release-applications-multi-arch.yml

Lines changed: 0 additions & 121 deletions
This file was deleted.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Release of NCCL Tests container multi-arch
2+
3+
on:
4+
push:
5+
paths:
6+
- 'hpc/applications/sphexa/Containerfile'
7+
- '.github/workflows/release-sphexa.yml'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
actions: read
14+
15+
env:
16+
REGISTRY: ghcr.io
17+
REPO: ghcr.io/${{ github.repository }}/sphexa
18+
19+
jobs:
20+
build:
21+
strategy:
22+
matrix:
23+
include:
24+
- arch: amd64
25+
runner: ubuntu-latest
26+
- arch: arm64
27+
runner: ubuntu-24.04-arm
28+
runs-on: ${{ matrix.runner }}
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
id: buildx
37+
38+
- name: Log in to GHCR
39+
uses: docker/login-action@v1
40+
with:
41+
registry: ${{ env.REGISTRY }}
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Build & push single-arch image
46+
run: |
47+
docker buildx build \
48+
--builder "${{ steps.buildx.outputs.name }}" \
49+
--platform linux/${{ matrix.arch }} \
50+
--file hpc/applications/sphexa/Containerfile \
51+
--tag "${{ env.REPO }}:build-${{ matrix.arch }}" \
52+
--push \
53+
.
54+
55+
# Multi-arch manifest that references both images
56+
manifest:
57+
name: Create multi-arch manifest
58+
needs: build
59+
runs-on: ubuntu-latest
60+
61+
steps:
62+
- name: Log in to GHCR
63+
uses: docker/login-action@v1
64+
with:
65+
registry: ${{ env.REGISTRY }}
66+
username: ${{ github.actor }}
67+
password: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- name: Verify single-arch images exist
70+
run: |
71+
set -euo pipefail
72+
73+
IMAGES=(
74+
"${{ env.REPO }}:build-amd64"
75+
"${{ env.REPO }}:build-arm64"
76+
)
77+
78+
for img in "${IMAGES[@]}"; do
79+
echo "Inspecting $img ..."
80+
if ! docker buildx imagetools inspect "$img" > /dev/null; then
81+
echo "::error file=manifest.yml::Image not found: $img"
82+
exit 1
83+
fi
84+
done
85+
86+
- name: Create & push multi-arch manifest
87+
run: |
88+
TAG=$(skopeo inspect --config docker://${{ env.REPO }}:build-amd64 | jq '.config.Labels["org.opencontainers.image.version"]' | tr -d '"')
89+
docker buildx imagetools create \
90+
--tag "${{ env.REPO }}:${TAG}" \
91+
"${{ env.REPO }}:build-amd64" \
92+
"${{ env.REPO }}:build-arm64"
93+
94+
- name: Log in to GHCR with Podman
95+
uses: redhat-actions/podman-login@v1
96+
with:
97+
registry: ${{ env.REGISTRY }}
98+
username: ${{ github.actor }}
99+
password: ${{ secrets.GITHUB_TOKEN }}
100+
101+
- name: Cleanup temporary single-arch images
102+
run: |
103+
skopeo delete docker://"${{ env.REPO }}:build-amd64"
104+
skopeo delete docker://"${{ env.REPO }}:build-arm64"

hpc/applications/sphexa-0.93.1/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

hpc/applications/sphexa-0.93.1/Containerfile renamed to hpc/applications/sphexa/Containerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/ethcscs/mpich:4.3.0-ofi1.15-cuda12.8
1+
FROM ghcr.io/sarus-suite/containerfiles-ci/mpich:4.3.2-ofi1.22-cuda12.8.1
22

33
# Download and compile HDF5 with MPI
44
ARG HDF5_VERSION=1.14.6
@@ -11,7 +11,7 @@ RUN wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_${HDF5_VERSION}
1111
&& ldconfig \
1212
&& cd .. && rm -rf hdf5-${HDF5_VERSION}*
1313

14-
ARG sphexa_version=0.93.1
14+
ARG sphexa_version=0.95
1515
RUN git clone https://github.com/sphexa-org/sphexa.git \
1616
&& cd sphexa \
1717
&& git checkout v${sphexa_version} \
@@ -20,3 +20,6 @@ RUN git clone https://github.com/sphexa-org/sphexa.git \
2020
&& make install \
2121
&& cd .. \
2222
&& rm -rf sphexa
23+
24+
LABEL org.opencontainers.image.ref.name="sphexa"
25+
LABEL org.opencontainers.image.version="${sphexa_version}-mpich4.3.2-ofi1.22-cuda12.8.1"

hpc/applications/sphexa/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPH-EXA MPI/CUDA Container
2+
3+
A minimal container image based on `ghcr.io/sarus-suite/containerfiles-ci/mpich:4.3.2-ofi1.22-cuda12.8.1` with:
4+
5+
- Parallel HDF5 (MPI-enabled)
6+
- SPH-EXA v0.95 with GPU-aware MPI
7+
8+
## Building
9+
~~~
10+
podman build \
11+
--build-arg HDF5_VERSION=1.14.6 \
12+
--build-arg sph_exa_version=0.95 \
13+
-t sph-exa-mpi-cuda .
14+
~~~

0 commit comments

Comments
 (0)