ci(container): automate the Gadi Singularity image builds - #710
Open
jcgraciosa wants to merge 1 commit into
Open
ci(container): automate the Gadi Singularity image builds#710jcgraciosa wants to merge 1 commit into
jcgraciosa wants to merge 1 commit into
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/developer/gadi_singularity/has had no CI since #133 and has only ever beenbuilt by hand. Adds
gadi-uw3-image.yml(pushes tomain/development,v*tags,releases) and
gadi-petsc-image.yml(onlypetsc.rhelandpetsc-custom/patches/**,since it is a ~25 min from-source build). Both amd64-only with Docker v2 media types
and attestations off, which is what Gadi's Singularity pulls; names derive from
github.repository_ownerso they work in a fork. Each build is smoke-tested, then olduntagged versions are pruned (keeping 3, tagged exempt).
Fixes five pre-existing bugs the automation exposed, none visible when building by hand:
underworld3.rhelomittedrequests, imported unguarded byutilities/_utils.py—
import underworld3raisedModuleNotFoundError.underworld3.rhel:22lacked a leading#; BuildKit read the comment as aninstruction (podman continues comments across a trailing backslash).
setuptools-scmwas missing from the builder, so with--no-build-isolationtheversion never resolved and the image reported
0.0.0.cython>=3.1was unbounded — petsc4py 3.25.0'sPC.pyx:1256fails under 3.3.0.Bisected: 3.2.9 is the last that builds.
ARGs re-declared afterFROMhad no defaults, soPYVERcould expand empty.Also adds
ARG UW3_REPO(hardcoded clone URL blocked fork builds) andARG PETSC_MAKE_NP, and repointsPETSC_IMAGEoff a personal namespace.Validated: both images build green, and a CI-built image pulls on Gadi and passes a
3-rank compute-node Stokes run matching a baremetal reference to the digit.
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: container-build failures, not library bugs, so no
tests/test_NNNN_*.pycould have caught them — the smoke-test job is the guard.
Underworld development team with AI support from Claude Code