Split the three largest packages into their own image layers #32

Merged
piers merged 1 commit from fix/containerfile-layer-split into main 2026-11-01 22:47:06 +00:00

Why

The first amd64 build for the #10 gate deployment could not be pushed: the venv layer compresses to 97.3 MB and the Cloudflare-proxied registry refuses a layer upload over 100 MB. imap-mailmind-mcp hit the same wall and splits its venv into layers.

Change

Containerfile only. In the builder stage the three largest packages (onnxruntime 67 MB, phonenumbers 46 MB, numpy with numpy.libs 70 MB uncompressed) move out of the venv; in the runtime stage they come back as three COPY layers at their original paths. File contents and paths are unchanged.

Verified

  • amd64 build from this commit: largest compressed layer 44.5 MB (was 97.3 MB); next largest 28.8 MB.
  • python -c "import onnxruntime, numpy, phonenumbers, peoplemind_mcp.server" in the built image: ok.
  • tests/test_deploy.py static tests: 6 passed. The 4 compose integration tests were not rerun; the image filesystem is identical, only its layer boundaries moved.

Part of dev/peoplemind-mcp#10 (the gate deployment on starbase-syd).

🤖 Generated with Claude Code

## Why The first amd64 build for the #10 gate deployment could not be pushed: the venv layer compresses to 97.3 MB and the Cloudflare-proxied registry refuses a layer upload over 100 MB. imap-mailmind-mcp hit the same wall and splits its venv into layers. ## Change `Containerfile` only. In the builder stage the three largest packages (onnxruntime 67 MB, phonenumbers 46 MB, numpy with numpy.libs 70 MB uncompressed) move out of the venv; in the runtime stage they come back as three `COPY` layers at their original paths. File contents and paths are unchanged. ## Verified - amd64 build from this commit: largest compressed layer 44.5 MB (was 97.3 MB); next largest 28.8 MB. - `python -c "import onnxruntime, numpy, phonenumbers, peoplemind_mcp.server"` in the built image: ok. - `tests/test_deploy.py` static tests: 6 passed. The 4 compose integration tests were not rerun; the image filesystem is identical, only its layer boundaries moved. Part of dev/peoplemind-mcp#10 (the gate deployment on starbase-syd). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The venv layer compressed to 97.3 MB on amd64, and the Cloudflare-proxied
registry at git.groupthink.asia refuses a layer upload over 100 MB, so the
image could not be pushed. onnxruntime, phonenumbers and numpy move out of
the venv in the builder stage and come back as separate layers in the
runtime stage, the imap-mailmind-mcp pattern. The largest layer is now
44.5 MB. Contents and paths are unchanged; the moved packages import.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
piers merged commit d553a6456a into main 2026-11-01 22:47:06 +00:00
Sign in to join this conversation.
No description provided.