Skip to content

Pin smoke Dockerfile to amd64; fail fast on missing overlay template#521

Open
eugenevinitsky wants to merge 2 commits into
3.0from
fix/docker-amd64-pin-overlay-template-docs
Open

Pin smoke Dockerfile to amd64; fail fast on missing overlay template#521
eugenevinitsky wants to merge 2 commits into
3.0from
fix/docker-amd64-pin-overlay-template-docs

Conversation

@eugenevinitsky

Copy link
Copy Markdown

What

  • tests/smoke_tests/Dockerfile: pin FROM --platform=linux/amd64 python:3.11-slim-bookworm and extend the header comment to state that the image is x86-64-only by definition (bit-exact AVX2 golden under qemu-x86_64-static; setup.py ships only the amd64 raylib archive) and that ARM hosts run it under emulation — pass --platform linux/amd64 to docker build/run if the FROM pin is not honored.
  • scripts/setup_container.sh: in create_overlay(), add a fail-fast guard before the cp — if $OVERLAY_TEMPLATE does not exist, print a clear error explaining the default path exists only on NYU Greene, with two remediations (export OVERLAY_TEMPLATE, or apptainer overlay create --size 15360 --create-dir /ext3 "$OVERLAY_PATH", available as singularity overlay create on singularity >= 3.8), then exit 1.
  • README.md: document that the /share/apps defaults (IMAGE_PATH, OVERLAY_TEMPLATE) are NYU-Greene-only, that OVERLAY_TEMPLATE is just a gzipped empty ext3 image, and how to substitute a site template / apptainer overlay create / any CUDA-capable .sif.
  • docs/cluster_training.md: one short comment in the quick-overview block pointing non-NYU users at OVERLAY_TEMPLATE/IMAGE_PATH exports or apptainer overlay create (see README defaults table).
  • AGENTIC_PR: French poem per repo convention for agent-created PRs.

Why

The smoke image is x86-64-only by design, but without a platform pin Apple-Silicon Docker builds an arm64 image that fails at link time (raylib 5.5 has no linux_arm64 asset). Separately, create_overlay() blindly cp'd the NYU-Greene-only template under set -e, so everyone off Greene got a bare "No such file or directory" with no hint of what the template is or how to substitute it.

Notes

  • Verification: bash -n scripts/setup_container.sh passes. The guard was exercised for real (safe off-cluster: only mkdir -p on a scratchpad-scoped CONTAINER_DIR precedes it): with OVERLAY_TEMPLATE=/nonexistent/... the script prints the full remediation message and exits 1. git diff confirms the Dockerfile's only functional change is the FROM platform pin; docker build was not run (Docker unavailable in this environment).
  • Risks: minimal. The pin only makes the existing implicit amd64 requirement explicit; on amd64 hosts behavior is unchanged. The guard only fires in the failure path that previously crashed with a worse message. README/docs changes are prose-only.
  • Merge-order: the docs/cluster_training.md hunk was kept to a 2-line comment insertion because another PR adds a section near the top of that file; if that PR lands first, this one may need a trivial rebase (comment placement only).

🤖 Generated with Claude Code

🤖 Generated with Claude Code

Eugene Vinitsky and others added 2 commits July 10, 2026 10:58
The smoke image is x86-64-only (bit-exact AVX2 golden, qemu-x86_64-static,
amd64-only raylib archive in setup.py) but had no platform pin, so builds
on Apple Silicon produced arm64 images that fail at link time. Pin FROM to
linux/amd64 and document the constraint in the header comment.

setup_container.sh create-overlay blindly cp'd the NYU-Greene-only
OVERLAY_TEMPLATE default under set -e, giving a bare "No such file or
directory" elsewhere. Add a fail-fast guard that names the path and points
at OVERLAY_TEMPLATE / apptainer overlay create. Document the NYU-only
defaults in README.md and docs/cluster_training.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant