fix(photo-ai): build weights in an isolated stage and stop blocking app deploys

Prefetch moved to a separate python:3.10-slim stage that only sees weights.py/fetch-weights.py, so editing app.py or vendor/ no longer invalidates the 360 MB weights layer. Weight catalog and download helpers extracted to photo-ai/weights.py; fetch-weights.py no longer imports app (torch). Cache mount switched to sharing=shared: a canceled build could leave the exclusive lock held and hang the next build forever; downloads now use a pid-unique tmp file, so concurrent builds cannot corrupt it. Docs recommend 'docker compose up -d --build app' for app updates instead of rebuilding photo-ai/face-id.
This commit is contained in:
dev
2026-10-23 10:09:58 +03:00
parent 7a2f8893a6
commit d0a17c5f62
8 changed files with 203 additions and 133 deletions
+4
View File
@@ -0,0 +1,4 @@
__pycache__
*.pyc
*.pyo
.pytest_cache