Commit 24c90d1
docker: split Dockerfile into runtime and dev targets
Rewrites the slim-bookworm Dockerfile as a two-target multi-stage build:
- runtime — minimal image for canfar batch jobs and downstream FROM
clauses. Ships astromatic binaries + jupyter + fitsio extras only.
- dev — runtime plus everyday CLI tools (vim, less, tmux, htop, ripgrep,
fd, jq, bat, git-lfs, …) and *all* extras pre-installed via the `dev`
meta-extra (test, lint, doc, release, jupyter, fitsio). Default target
when `--target` is omitted; published as `:<branch>` (no suffix).
Both stages share a `base` stage carrying system deps + uv + the lockfile
copy, so the heavy apt + wheel resolution is cached once.
Addresses Martin's PR feedback on #719:
- `uv run pytest: No such file or directory` — pytest now ships in the
dev image (was previously only in the never-built `--extra test`).
- `uv sync --extra X: Read-only file system` — the dev image has every
extra pre-baked, so live `uv sync` is no longer needed at all. As a
belt-and-braces also `chmod -R go+rwX /app` so non-root users on
canfar/skaha can still mutate the venv when they want to.
- "no vim in the slim image" — `vim`, `less`, `tmux`, `htop`, plus a
curated subset of cailmdaley/containers (rg/fd/jq/bat/…) now ship in
the dev target.
deploy-image.yml builds, smoke-tests, and pushes both targets:
- runtime: source-extractor / weightwatcher / psfex / shapepipe_run all
invoked inside the built image.
- dev: vim, ripgrep, pytest verified runnable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f1d414b commit 24c90d1
2 files changed
Lines changed: 146 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | | - | |
40 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
41 | 55 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
46 | 60 | | |
47 | | - | |
| 61 | + | |
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
52 | | - | |
| 66 | + | |
53 | 67 | | |
54 | | - | |
| 68 | + | |
55 | 69 | | |
56 | 70 | | |
57 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
58 | 103 | | |
59 | 104 | | |
| 105 | + | |
| 106 | + | |
60 | 107 | | |
61 | | - | |
62 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
2 | 15 | | |
3 | | - | |
4 | 16 | | |
5 | | - | |
6 | 17 | | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
10 | | - | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
12 | | - | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
| |||
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
51 | | - | |
52 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
| |||
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
62 | | - | |
63 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
0 commit comments