Skip to content

[Feature]: Publish monailabel image and support MONAI Label in production compose - #949

Merged
atriaybagur merged 3 commits into
55-feature-add-monailabel-to-ohif-viewer-plugin-xnatfrom
947-publish-monailabel-image-prod-compose
Aug 12, 2026
Merged

[Feature]: Publish monailabel image and support MONAI Label in production compose#949
atriaybagur merged 3 commits into
55-feature-add-monailabel-to-ohif-viewer-plugin-xnatfrom
947-publish-monailabel-image-prod-compose

Conversation

@atriaybagur

@atriaybagur atriaybagur commented Aug 12, 2026

Copy link
Copy Markdown
Member

Description

Publishes the monailabel image to GHCR and lets the production trust compose run MONAI Label. Follow-up to #945 (stacked on its branch — do not merge before #945; GitHub will retarget this to develop when it merges).

  • docker_build_monailabel.yml — orthanc pattern (direct push + workflow_dispatch + PR build; no test workflow to gate on). Two additions: reclaims ~25 GB of preinstalled runner toolchains before building (the image is ~10.4 GB vs ubuntu-latest's ~14 GB free; plain rm, no third-party actions), and an import smoke (monailabel/torch/sam2/XNATDatastore + curl) between build and push so a broken runtime stack never publishes. Tags: immutable sha-<short7> + :stag (develop) / :prod (main), matching the fleet.
  • compose_trust.production.monailabel.yml — image-only overlay; existing $(__DCKR_SUFFIX) machinery selects it, no new wiring.
  • PROD guard: refusal → warning. The hard block existed because no image was published; that's now a per-trust judgement call instead — enabling MONAI Label re-introduces the OHIF viewer plugin trust XNAT deliberately excludes (trust XNAT: bulk image-pull wedges permanently — Reactor EventBus ring-buffer livelock (OHIF listener) + restart strands directArchive #662 bulk-import livelock). The warning says exactly that. The GPU refusal stays hard.
  • Dev deliberately keeps building locally — pointing the dev overlay at :stag before a first publish exists would fail every make up-trust on pull. Flipping dev to pull-by-default can follow once the tag exists.

Linked Issues

Fixes #947

Checklist

  • Follows the project's coding conventions and style guide
  • Updates documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Type of Change

  • Non-breaking change (fix or new feature that would not break existing functionality).

Testing

Additional Notes

First real exercise of the disk-reclaim step happens on the first workflow run; if ubuntu-latest's preinstalled set has shifted and space still runs out, the fallback is the maximize-build-space action.

Acceptance Criteria

Imported from issue #947

Follow-up to #55 / PR #945.

…mpose (#947)

docker_build_monailabel.yml follows the orthanc pattern (direct push +
workflow_dispatch + PR build, no test-workflow gate) with two additions: the
job reclaims ~25GB of preinstalled runner toolchains before building — the
image is ~10.4GB against ubuntu-latest's ~14GB free — and an import smoke
(monailabel/torch/sam2/XNATDatastore + curl) runs between build and push, so
a broken runtime stack never publishes. The Dockerfile's own build asserts
already cover the unpatched-XNAT-auth and non-CUDA-12-torch states.

compose_trust.production.monailabel.yml is image-only like the rest of the
production compose; the Makefile's $(__DCKR_SUFFIX) machinery picks it up
with no new wiring. The hard PROD refusal in require_monailabel_supported
becomes an explicit warning: enabling MONAI Label re-introduces the OHIF
viewer plugin the trust XNAT deliberately excludes (FLIP#662 bulk-import
livelock), which is a per-trust judgement call, not a build limitation —
intended for hybrid/on-prem annotation trusts. The GPU refusal stays hard: a
GPU-less host cannot run it at all.

Dev keeps building locally: pointing the dev overlay at ghcr :stag before a
first publish exists would fail every `make up-trust` on pull.

Signed-off-by: at24_bioeng625-pc <alexandre.triay_bagur@kcl.ac.uk>
@github-actions github-actions Bot changed the title Publish the monailabel image and support MONAI Label in production compose [Feature]: Publish monailabel image and support MONAI Label in production compose Aug 12, 2026
@github-actions

Copy link
Copy Markdown

✅ Acceptance criteria have been automatically imported from the linked issue(s) and added to the PR description.

Mirrors the compose overlay: Deployment + Service + weights PVC, gated on
monailabel.enabled (default false — the default render is proven unchanged,
comment-only delta). The chart's XNAT already ships the ohif-viewer plugin in
its roster, so unlike compose there is no plugin step and no FLIP#662
exclusion to weigh here.

Chart-specific decisions:

- The XNAT archive is read straight off xnat-web's data PVC (read-only
  `archive` subPath). That PVC is ReadWriteOnce by default, so the pod is
  pinned to xnat-web's node via required podAffinity
  (monailabel.coScheduleWithXnat, default true); RWX storage classes can
  disable it.
- monailabel.publicUrl is `required` when enabled rather than defaulted: XNAT
  hands it to the OHIF viewer, which calls it from the clinician's browser —
  the chart cannot derive an outside-the-cluster URL, and a wrong default
  fails only at click time. The helm-template CI job asserts the guard fires.
- Exposed as NodePort (default 30030) plus a scoped NetworkPolicy opening
  exactly that port on exactly this pod through the namespace's default-deny
  ingress (service.allowExternalIngress).
- Startup probe allows 30 minutes: first start on a cold volume downloads
  pretrained weights including the ~900MB SAM checkpoint.
- Render coverage lives in the helm-template job, NOT ci/test-values.yaml:
  the kind install deploys those values and waits for pod readiness, which a
  ~10.4GB GPU image can never satisfy there.

Signed-off-by: at24_bioeng625-pc <alexandre.triay_bagur@kcl.ac.uk>
…ment

[Feature]: MONAI Label deployment in the Kubernetes trust chart
@atriaybagur
atriaybagur marked this pull request as ready for review August 12, 2026 14:33
@atriaybagur
atriaybagur merged commit 9dc5948 into 55-feature-add-monailabel-to-ohif-viewer-plugin-xnat Aug 12, 2026
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