Skip to content

Fix live demo: self-healing model fetch + slimmer image#66

Merged
Thomasbehan merged 1 commit into
mainfrom
demo-model-fix
Jun 10, 2026
Merged

Fix live demo: self-healing model fetch + slimmer image#66
Thomasbehan merged 1 commit into
mainfrom
demo-model-fix

Conversation

@Thomasbehan

Copy link
Copy Markdown
Owner

The Render live demo returned model_unavailable because the deployed container didn't have the M-4s model at models/triage/ (it was running the new triage code on the old image/Dockerfile).

  • Self-heal: views/api.py now downloads the released M-4s model + artifact bundle into the artifacts dir on first prediction if it's missing — so the demo works regardless of how the image was built. Failures degrade gracefully.
  • Dockerfile: chown /app to the runtime user so that fetch can write.
  • Slimmer build: drop unused torch/torchvision (never imported) — large dependencies that bloated the Render build.

@render render Bot temporarily deployed to demo-model-fix - LesNet PR #66 June 10, 2026 09:18 Destroyed
- views/api.py: download the released M-4s model into the artifacts dir on first use if
  missing, so the deployed app works even when the image didn't bake it in (was returning
  model_unavailable on Render); broaden the failure path to degrade gracefully
- Dockerfile: chown /app to appuser so the runtime model fetch can write
- setup.py: drop unused torch/torchvision (large, never imported) to slim the build
@render render Bot temporarily deployed to demo-model-fix - LesNet PR #66 June 10, 2026 09:20 Destroyed
@Thomasbehan Thomasbehan merged commit a515a47 into main Jun 10, 2026
5 checks passed
@Thomasbehan Thomasbehan deleted the demo-model-fix branch June 10, 2026 09:20
Thomasbehan added a commit that referenced this pull request Jun 10, 2026
- views/api.py: download the released M-4s model into the artifacts dir on first use if
  missing, so the deployed app works even when the image didn't bake it in (was returning
  model_unavailable on Render); broaden the failure path to degrade gracefully
- Dockerfile: chown /app to appuser so the runtime model fetch can write
- setup.py: drop unused torch/torchvision (large, never imported) to slim the build
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