Adds ensure_blla_model.py which loads the blla segmentation model with ketos on every container start. If the model is missing or in the legacy PyTorch ZIP format (incompatible with ketos 7), it re-downloads the correct CoreML protobuf model from Zenodo (DOI 10.5281/zenodo.14602569). The Dockerfile now uses entrypoint.sh which runs this check before starting uvicorn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
350 B
Bash
10 lines
350 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Validate the blla segmentation base model and download it if missing or
|
|
# incompatible. ketos 7 dropped support for legacy PyTorch ZIP archives —
|
|
# this ensures the volume always holds a loadable CoreML protobuf model.
|
|
python3 /app/ensure_blla_model.py
|
|
|
|
exec uvicorn main:app --host 0.0.0.0 --port 8000 --workers 1
|