Skip to content

Bundle GraXpert AI models into Docker image#185

Merged
bscholer merged 2 commits into
mainfrom
fix/graxpert-bundle-models
May 15, 2026
Merged

Bundle GraXpert AI models into Docker image#185
bscholer merged 2 commits into
mainfrom
fix/graxpert-bundle-models

Conversation

@bscholer

Copy link
Copy Markdown
Owner

Summary

  • GraXpert downloads its onnxruntime models (~700 MB: bge 208 MB + denoise 456 MB) via a private Minio bucket on first use
  • In a container the download can fail partway through, leaving a partial .minio file in the version directory
  • list_local_versions() only checks that the directory is non-empty, so it thinks the model is installed and skips re-downloading
  • The next job crashes with onnxruntime NoSuchFile: model.onnx

Fix: add a RUN step to the runtime stage that pre-downloads both models during image build by running GraXpert against a minimal synthetic FITS. The Minio download completes inside get_ai_version() before inference starts, so inference failures on the 64×64 image are expected and silenced with || true. A final ls fails the build loudly if either model.onnx is missing.

Test plan

  • Build the CUDA image (docker build --build-arg BASE=nvidia/cuda:12.4.1-runtime-ubuntu22.04 ...) and confirm the build log shows GraXpert downloading models and the final ls prints both model.onnx paths
  • Run a job with the bge background extraction node enabled — should complete without the onnxruntime NoSuchFile error
  • Confirm image size increase is expected (~700 MB larger)

bscholer and others added 2 commits May 14, 2026 16:27
overflow-x: auto implicitly enables overflow-y: auto per spec, producing
a spurious vertical scrollbar. Clamp it to hidden.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GraXpert downloads its onnxruntime models (~700 MB total) via a private Minio
bucket on first use. In a container these downloads can fail silently partway
through: the partial zip leaves a non-empty directory, which tricks
list_local_versions() into thinking the model is installed, and the next job
crashes with onnxruntime NoSuchFile on model.onnx.

Add a RUN step in the runtime stage that warms both downloads at build time by
running GraXpert against a tiny synthetic FITS. The Minio download completes
inside get_ai_version() before inference starts, so inference failures on the
64×64 image are expected and silenced. A final 'ls' fails the build loudly if
either model.onnx is missing.
@bscholer
bscholer merged commit fcb1243 into main May 15, 2026
5 checks passed
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