Spaces:
Sleeping
Sleeping
k22056537 commited on
Commit ·
6dcb046
1
Parent(s): c2bffa9
fix: resolve LFS joblib/npz files at runtime before app starts
Browse filesSmall LFS-tracked files (joblib, npz) are pointers in Docker.
start.sh downloads real files from HF API before uvicorn launches
so model pipelines can load them.
- Dockerfile +1 -1
- resolve_lfs.py +0 -5
Dockerfile
CHANGED
|
@@ -33,4 +33,4 @@ RUN mkdir -p /app/data && chown -R user:user /app
|
|
| 33 |
USER user
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
-
CMD ["
|
|
|
|
| 33 |
USER user
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
+
CMD ["bash", "start.sh"]
|
resolve_lfs.py
CHANGED
|
@@ -6,15 +6,10 @@ SPACE = os.environ.get("SPACE_ID", "FocusGuard/final")
|
|
| 6 |
BASE = f"https://huggingface.co/spaces/{SPACE}/resolve/main"
|
| 7 |
|
| 8 |
FILES = [
|
| 9 |
-
"checkpoints/mlp_best.pt",
|
| 10 |
"checkpoints/scaler_mlp.joblib",
|
| 11 |
"checkpoints/hybrid_combiner.joblib",
|
| 12 |
-
"checkpoints/hybrid_focus_config.json",
|
| 13 |
-
"checkpoints/xgboost_face_orientation_best.json",
|
| 14 |
"checkpoints/meta_best.npz",
|
| 15 |
"checkpoints/meta_mlp.npz",
|
| 16 |
-
"checkpoints/L2CSNet_gaze360.pkl",
|
| 17 |
-
"models/L2CS-Net/models/L2CSNet_gaze360.pkl",
|
| 18 |
]
|
| 19 |
|
| 20 |
|
|
|
|
| 6 |
BASE = f"https://huggingface.co/spaces/{SPACE}/resolve/main"
|
| 7 |
|
| 8 |
FILES = [
|
|
|
|
| 9 |
"checkpoints/scaler_mlp.joblib",
|
| 10 |
"checkpoints/hybrid_combiner.joblib",
|
|
|
|
|
|
|
| 11 |
"checkpoints/meta_best.npz",
|
| 12 |
"checkpoints/meta_mlp.npz",
|
|
|
|
|
|
|
| 13 |
]
|
| 14 |
|
| 15 |
|