k22056537 commited on
Commit
5bbefab
·
1 Parent(s): 6e85aa6

fix: make face_mesh model pre-download non-fatal during build

Browse files

Network restrictions in HF build env can block Google Storage.
The app will retry the download at startup if it fails here.

Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -63,7 +63,12 @@ print('Checkpoint resolution done')\
63
  RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/static/
64
 
65
  ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
66
- RUN python -c "from models.face_mesh import _ensure_model; _ensure_model()"
 
 
 
 
 
67
 
68
  RUN mkdir -p /app/data && chown -R user:user /app
69
 
 
63
  RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/static/
64
 
65
  ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
66
+ RUN python -c "\
67
+ try:\
68
+ from models.face_mesh import _ensure_model; _ensure_model(); print('face_mesh model cached')\
69
+ except Exception as e:\
70
+ print(f'face_mesh pre-download skipped: {e} — will retry at runtime')\
71
+ "
72
 
73
  RUN mkdir -p /app/data && chown -R user:user /app
74