The catalogue published one image. Filling it is not nine more Containerfiles: it is a question of who compiles the software, against which MPI, and how a second cluster gets it without paying for the first one's build. image/apps holds the answer to the first of those - one driver over one directory per application, with three recipes (somebody else's image, one we assemble, or Spack against our own MPI) and the rule for choosing between them. The catalogue is generated from the recipes rather than kept beside them, because an entry in it is a promise that a head node can pull the image, and a promise nobody checks is how the first generated catalogue came to point busybox at a tag that had never existed - guessed from the upstream version instead of read from the registry. The generator now asks the registry, and an application whose image is not there is reported rather than offered. Recipes are intent and published.json is measurement, kept apart so that recording the hash of a push does not rewrite the reasoning in the recipe that produced it. Two entries to start: busybox, which is the cheapest way to prove the whole delivery path, and stress-ng, which is what somebody actually runs first on a cluster they have just been handed. docs/22 is the Spack half of the question, from reading Chapar: what it would give us, the three levels of integration, and the PMIx version to settle on a real head before a single image is built against it. Two things about the build host, both found by trying: Apptainer is not installed, and Docker is, which sets FORWARD DROP and leaves podman unable to build anything that needs the network. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53 lines
2.8 KiB
Docker
53 lines
2.8 KiB
Docker
# Node burn-in, in about ten megabytes.
|
|
#
|
|
# Alpine, not rockylinux:9 - the one place in this directory where that is
|
|
# the right answer. Every compute application here shares the node image's
|
|
# base so that a user's job links the libraries it was built against. This
|
|
# links nothing: it is a single self-contained diagnostic that loads the
|
|
# machine and reports what happened. Paying a hundred and eighty megabytes
|
|
# of Rocky base for that would make the cheapest thing in the catalogue one
|
|
# of the more expensive ones, for no property anybody uses.
|
|
#
|
|
# The rule that follows: Alpine is allowed for a tool that is self-contained
|
|
# and talks to nobody. It is not allowed for anything a job links against,
|
|
# because musl is not the node's libc and the failure would arrive as a
|
|
# missing symbol inside a job that had already queued.
|
|
FROM docker.io/library/alpine:3.21
|
|
|
|
# Pinned exactly, and the catalogue's version field is this number rather
|
|
# than a build date. A tenant who reads "stress-ng 0.18.07" in the portal
|
|
# gets 0.18.07, which a floating package cannot promise.
|
|
#
|
|
# Alpine keeps only the current build of a package in its index, so the day
|
|
# this is rebuilt as -r1 the pin stops resolving and this build fails. That
|
|
# is the intended behaviour: it fails here, loudly, on a build host, and the
|
|
# fix is one line and a regenerated catalogue. The alternative is a version
|
|
# number in the portal that quietly stops being true.
|
|
#
|
|
# --no-cache rather than an install followed by a clean: apk leaves the
|
|
# index behind otherwise, which is most of the image at this size.
|
|
# stress-ng is in the community repository, which the official Alpine image
|
|
# enables; if that ever changes this line is what says so.
|
|
ARG STRESS_NG_VERSION=0.18.07-r0
|
|
RUN apk add --no-cache "stress-ng=${STRESS_NG_VERSION}"
|
|
|
|
# Assert the version that landed, not the one that was asked for. apk can
|
|
# satisfy a constraint with something other than the literal string above,
|
|
# and a catalogue entry that disagrees with the binary is worse than no
|
|
# entry - it is believed.
|
|
RUN set -eux; \
|
|
got="$(stress-ng --version | awk '{print $3}')"; \
|
|
want="${STRESS_NG_VERSION%-r*}"; \
|
|
[ "$got" = "$want" ] || { echo "installed $got, catalogue promises $want"; exit 1; }; \
|
|
stress-ng --version > /etc/stress-ng-version
|
|
|
|
# Run it, do not just find it. stress-ng links libcap and several others, and
|
|
# a package that installed but cannot start is on PATH and dies on first use
|
|
# - inside a job that has already queued, waited and started. Two seconds of
|
|
# one CPU is enough to prove it executes and exits cleanly.
|
|
RUN stress-ng --cpu 1 --timeout 2s --metrics-brief
|
|
|
|
LABEL org.opencontainers.image.title="hpcod stress-ng" \
|
|
org.opencontainers.image.description="Node burn-in and load generation; no MPI, no host libraries" \
|
|
org.opencontainers.image.version="0.18.07"
|