fix(deploy): onnxruntime is a runtime dependency; bake the demo model into the image - #74
Merged
Merged
Conversation
…odel in The web demo now serves the JEPA family by default, whose encoder loads through onnxruntime — but onnxruntime was declared only in the optional [jepa] extra. A deployment installing base requires (the Dockerfile runs `pip install -e .`) imports cleanly and then raises ModuleNotFoundError on the first /predict. The Dockerfile also fetched the old M-4s Keras model, which the demo no longer serves. It now bakes in the JEPA medium tarball instead. The app can self-heal by downloading it at runtime, but that would make the first request after a cold start pull 318 MB and time out. Verified: the fetch+extract produces models/jepa/medium/jepa_config.json and _get_predictor() loads it with no environment overrides.
render
Bot
temporarily deployed
to
fix/render-runtime-deps - LesNet PR #74
July 27, 2026 00:28
Destroyed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Render deployment.
onnxruntimewas missing from base requiresThe demo now serves the JEPA family by default (#71), and its encoder loads through
onnxruntime— butonnxruntimewas declared only in the optional[jepa]training extra. The Dockerfile runspip install -e ., i.e. base requires only, so the container imports cleanly and then raisesModuleNotFoundError: onnxruntimeon the first/predict.This is a bug I introduced when changing the default predictor; the dependency became a runtime one and the packaging didn't follow.
The image fetched a model the demo no longer serves
The Dockerfile pulled the old
M-4sKeras model. The demo now serves JEPA medium, so the image now bakes that in instead. It could self-heal at runtime —_ensure_jepa_modeldownloads on demand — but that would make the first request after a cold start pull 318 MB, which on Render's free tier will time out and look like a broken app.Verified locally
The exact
curl … | tar xz -C models/jepafrom the Dockerfile was run, then_get_predictor()loaded it with no environment overrides — the same path the container takes.Test plan
ruff checkcleanNote: this addresses a runtime failure I can prove. If Render is failing at build time, that may be separate — TensorFlow 2.21 is a very heavy base dependency for a container that no longer needs it for the demo path. I'd want the actual build log before changing that.