docker: smoke-test the example pipeline in read-only mode#731
Open
cailmdaley wants to merge 1 commit into
Open
docker: smoke-test the example pipeline in read-only mode#731cailmdaley wants to merge 1 commit into
cailmdaley wants to merge 1 commit into
Conversation
`shapepipe_run -c /app/example/config.ini` succeeds in docker because the container filesystem is writable, but fails under apptainer/SIF because OUTPUT_DIR=./example/output resolves under WORKDIR=/app which is read-only: ERROR: [Errno 30] Read-only file system: './example/output/shapepipe_runs.txt' The CI smoke test was passing while the apptainer path silently broke — same class of gap dc13582 closed for `uv run pytest`, but for the pipeline entry point. Fix: a small wrapper `scripts/sh/shapepipe_run_example.sh` that mktemp's a workdir, copies /app/example into it, cd's, and execs shapepipe_run. The existing Dockerfile auto-symlink rule makes it available as `shapepipe_run_example` on $PATH. The CI step switches to the wrapper and runs it under `docker run --read-only --tmpfs /tmp:rw`, which emulates SIF semantics. Any future regression that relies on a writable cwd will fail here instead of silently breaking apptainer users. Drive-by: tighten `.gitignore`'s example-output patterns from `*shapepipe_run_*` (catches anything with that substring, including this new wrapper) to `example/output/shapepipe_run_*`. Co-Authored-By: Claude Opus 4.7 (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.
Summary
scripts/sh/shapepipe_run_example.sh— a small wrapper that mktemp's a workdir, copies/app/example/into it, cd's, and execsshapepipe_run. The existing Dockerfile auto-symlink rule (scripts/<lang>/<name>.<ext>→/usr/local/bin/<name>) makes it available asshapepipe_run_exampleon$PATH.deploy-image.ymlto call the wrapper, and runs it underdocker run --read-only --tmpfs /tmp:rw— this emulates apptainer/SIF semantics, so the read-only constraint is now actually exercised in CI..gitignorefrom*shapepipe_run_*(which catches any path containing that substring, including the new wrapper) toexample/output/shapepipe_run_*.Why
shapepipe_run -c /app/example/config.inisucceeds under docker because the container filesystem is writable. Under apptainer/SIF it fails:OUTPUT_DIR=./example/outputresolves underWORKDIR=/app, which is read-only in SIF. CI was passing while the apptainer path silently broke — same class of gap dc13582 closed foruv run pytest, but for the pipeline entry point.The wrapper closes the gap without changing user-facing config or the entry point. Same command works for both docker and apptainer users.
Verified locally
Built a fresh
:developsandbox at/n17data/cdaley/containers/shapepipe-712-checkand ran the wrapper logic via:— pipeline runs all 5 module steps and ends with
A total of 0 errors were recorded. Finishing ShapePipe Run.Test plan
Test runtime — shapepipe entry point (read-only fs)step passes (wrapper resolves on PATH; mktemp/cp/cd dance works under--read-only --tmpfs /tmp:rw).gitignoreretightening (the new pattern is strictly narrower)🤖 Generated with Claude Code