docs(wiki): trainer as a compose profile — one running service is expected, first-run pull/login, why the collector TAG bump mattered, park-2 needs no bump until a pin

Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
This commit is contained in:
2026-09-07 11:30:28 +02:00
parent 3f16925fe0
commit 3e77a4ad7c
3 changed files with 29 additions and 1 deletions
@@ -152,6 +152,25 @@ the image, bump the booth's `TAG`. The trainer is never started by a deploy (a p
`wash-collector` stack's `TRAINER_OUT` / `TRAINER_PUBLISH_TOKEN` lines stay commented until the
first publish.
## Operating notes (first deploy, 2026-09-07)
- **Only the collector shows as running — that is correct.** The trainer is not a service; it is
behind the `train` compose *profile*, so a deploy never starts it and `docker ps` on
`art-docker-station` lists one container. The trainer runs when invoked by hand, does its job,
exits, and leaves nothing behind (`--rm`).
- **A deploy does not pull profile services either.** The first `run` pulls the image itself, so
the host's Docker must be logged in to the registry (`docker compose -f
docker-compose.collector.yml --profile train pull trainer` is the check; if refused, `docker
login git.infra.msai.al` on the host first).
- **Why the wash-collector TAG bump mattered** although the collector code did not change: the
trainer service uses the stack's TAG, so a bump makes `run` resolve to an image that exists
(`stage-f7a262a` is the first tag that carries `parking-trainer`).
- **park-2 does not need the bump** until a model is pinned: the new vision image ships with an
empty `bodytype.version`, phase B off, nothing for a booth to gain.
- **What to run, from the stack's directory on the host:** `inspect` first (label counts per
class, `ready: false` until enough are reviewed), then `train`, read `report.md` under
`TRAINER_OUT/<version>/`, then `publish`, pin, push, bump the booth. Commands under §Running it.
## Packaging rule (same as the vision service)
Core deps are light (numpy, opencv-headless, onnxruntime): `inspect`, `evaluate`, the data and
+3 -1
View File
@@ -160,7 +160,9 @@ Same repo, branch and pinned `TAG` promotion, its own secret references, and —
names its compose files — nothing booth-side lands on that host and nothing of it on a booth.
The same stack carries the phase-B **trainer** as a compose *profile* (`train`,
[[bodytype-classifier-training]]): a deploy never starts it; the owner runs it by hand on the host
with `docker compose … --profile train run --rm trainer …`. Its two env lines (`TRAINER_OUT`, the
with `docker compose … --profile train run --rm trainer …`. So after a deploy of that stack
`docker ps` shows one container — expected; and a deploy pulls nothing for the profile, the
first `run` does (host Docker must be logged in to the registry). Its two env lines (`TRAINER_OUT`, the
`TRAINER_PUBLISH_TOKEN` secret reference) stay commented in `resources.toml` until the first
publish.