Spaces:
Runtime error
Runtime error
Commit History
-
hf: adapt Dockerfile for HF Spaces, add entrypoint + migrate script
- Port changed 8000 → 7860 (HF Spaces app_port requirement) - ENTRYPOINT set to entrypoint.sh (runs migrations before uvicorn) - Copy alembic/ + alembic.ini into image (was missing — needed for migrations) - Pre-warm sentence-transformers/all-MiniLM-L6-v2 at build time alongside Maia-2 - DATABASE_URL default → sqlite:////data/metropolis_chess.db (HF persistent /data volume) - REDIS_URL default cleared (no Redis on HF Spaces; in-process fallback activates) - HF_HOME=/app/.cache/hf unified for maia2 + sentence-transformers caches - /app/logs + /data created with chmod 777 so uid 1000 (HF runtime user) can write - entrypoint.sh: runs scripts/migrate.py then exec uvicorn - scripts/migrate.py: fresh DB → create_all + alembic stamp head; existing DB → alembic upgrade head. Avoids the 0001 no-op / 0002 batch-alter failure that occurs when alembic upgrade head runs against an empty SQLite file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7fdba7e