Repository navigation
ci(container): build HPC images for Gadi, Kaiju and Setonix from shared recipes - #710
Conversation
Adds two workflows for docs/developer/gadi_singularity/, which has had no CI since underworldcode#133 and has only ever been built by hand: - gadi-uw3-image.yml builds underworld3.rhel on pushes to main/development, v* tags and releases, publishing underworld3-gadi:<branch|tag>. - gadi-petsc-image.yml builds petsc.rhel, triggered only by that file and petsc-custom/patches/**, publishing petsc-gadi:<version>-ompi. Both are amd64-only and publish Docker v2 media types with buildx attestations disabled, which is what Gadi's Singularity pulls reliably. Image names derive from github.repository_owner so the files work unchanged in a fork. Each build is smoke-tested, then old untagged versions are pruned (keeping 3, tagged exempt) only if that test passed. Fixes five pre-existing problems the automation exposed, none of them visible when building by hand on macOS: - underworld3.rhel omitted requests, which utilities/_utils.py imports unguarded at module level, so import underworld3 raised ModuleNotFoundError. - underworld3.rhel:22 was missing a leading '#'. podman continues a comment across a trailing backslash; BuildKit read it as an instruction. - setuptools-scm was absent from the builder, so with --no-build-isolation the dynamic version never resolved and the image reported 0.0.0. - petsc.rhel pinned cython>=3.1 unbounded. petsc4py 3.25.0's PC.pyx:1256 does not cythonize under 3.3.0; bisected, 3.2.9 is the last that builds. - ARGs re-declared after FROM carried no defaults, so PYVER could expand empty and yum would look for python-pip. Also adds ARG UW3_REPO, since the clone URL was hardcoded and a fork could not build its own branches, and ARG PETSC_MAKE_NP. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Converting to draft: got access to Setonix so I'm extending this PR to build the Setonix image from the same recipes (per-platform base + shared PETSc/UW3 Containerfiles). Scope grows from Gadi to Gadi, Kaiju and Setonix; I'll update the title and description and mark it ready once the fork builds have been tested. |
… gadi_singularity to hpc_containers
Issues in this branch's territoryTerritory is the HPC container recipes and their workflows.
The blocker#808 names two files and their lines. This PR removes the pin from both: and then re-adds it in the two new shared recipes it introduces:
I have not changed it. The right pin is not a one-line guess: PETSc and petsc4py are built in these images, and the NumPy major version is an ABI boundary for the Cython extensions, so moving it needs a container build to verify and that is not something this session can do. Flagging rather than fixing. Everything else here looks sound and the workflows are a clear improvement on three divergent recipe sets. Happy to merge on your word with #808 left open and re-pointed at the new files, or to hold until the pin is settled. Underworld development team with AI support from Claude Code |
|
@jcgraciosa — one question before this merges, and a correction to what we wrote above. Correction first. We called the The question. Is What prompts it is the pin immediately above it in The cython bound says exactly why it exists. The numpy bound, one line later, says nothing — and it is the same value the old Three cases and what each wants:
Everything else here reads well. Pushing the OS/MPI knowledge down into the two One operational note for whoever merges, not a review point: all three workflows fire on merge and the PETSc and UW3 jobs will fail until the bases exist, so the failed jobs need re-running once Underworld development team with AI support from Claude Code |
|
Thanks for the feedback @lmoresi. The pin was inherited from the old recipes and I missed changing them. The HPC images do not need NumPy 1. Lifted to Verified:
If there are no other issues, I can add this to Underworld development team with AI support from Claude Code |
ci(container): build HPC images for Gadi, Kaiju and Setonix from shared recipes
Automates the HPC Singularity images (hand-built since #133) and extends them from Gadi to Kaiju and Setonix from one set of recipes.
Layout —
docs/developer/hpc_containers/(wasgadi_singularity/):base.rocky-ompiandbase.ubuntu-mpichare the only files that know an OS or MPI, each published as:runtimeand:builder;petsc.hpcandunderworld3.hpcare shared and built once per base.Workflows —
hpc-base-images.yml,hpc-petsc-image.yml,hpc-uw3-image.yml, each a gadi/setonix matrix. amd64, Docker v2 media types, no attestations. Smoke tests import UW3 and the optional stack and assert the MPI flavour in a 2-rank run; untagged versions pruned after, tagged never. Images:uw3-base-*,petsc-{gadi,setonix},underworld3-{gadi,setonix}; Kaiju usesunderworld3-gadi. Compressed:underworld3-gadi1.17 GB (the hand-built v3.1.0 was 1.19),underworld3-setonix1.27 GB, PETSc 0.61 / 0.69 GB, bases 0.39 / 0.49 GB.Validated on the fork's images. Gadi: Stokes + parallel HDF5; with host MPI injected the container equals bare metal (1.5 us, 13.6 GB/s). Kaiju: shared container deployed. Setonix: Cray MPICH via
singularity/4.1.0-mpi, parallel HDF5 on Lustre works (Pawsey's known issue is moot with the current module), Slingshot fabric confirmed. Setonix needs the MPICH 3.4.3 base — Cray MPICH 8.1 lacks the MPI-4 symbols code built against 4.x references. Site instructions: https://github.com/underworld-community/uw3-hpc-install-runBootstrap, once: on merge all three workflows fire and PETSc/UW3 fail until the bases exist. Re-run failed jobs after
hpc-base-images.ymlis green.Fixes found on the way: missing
requests; a comment without#that BuildKit ran; missingsetuptools-scm(version0.0.0);cythonpinned<3.3(petsc4py 3.25.0 fails under 3.3.0);ARGdefaults afterFROM;ARG UW3_REPOfor fork builds;gcc-c++in the runtime so UW3 can be rebuilt in place.Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8)maybe_/try_/do_) and no commented-out code (S3, S4).array/mesh.X.coords— nowith ....access(...), nomesh.data(S7)pixi.toml/pixi.lockor other dependency changes riding in an unrelated PRS8 unticked: the fixes are container-build failures, not library bugs, so no
tests/test_NNNN_*.pycould have caught them — the smoke-test steps are the guard.Underworld development team with AI support from Claude Code