feat: add HF_HUB_OFFLINE env var to skip HuggingFace cache validation on startup

Once Kokoro voice .pt files are cached locally, setting HF_HUB_OFFLINE=1
prevents HEAD requests to HuggingFace on each restart, making voice pre-warming
fully offline and faster.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 17:00:50 -04:00
parent 882ea176b2
commit f2dd25737a
+2
View File
@@ -25,6 +25,8 @@ services:
VAPID_PRIVATE_KEY: "${VAPID_PRIVATE_KEY:-}"
VAPID_PUBLIC_KEY: "${VAPID_PUBLIC_KEY:-}"
VAPID_CLAIMS_SUB: "${VAPID_CLAIMS_SUB:-mailto:admin@fabledassistant.local}"
# Prevent HuggingFace from making network calls at startup once models are cached:
HF_HUB_OFFLINE: "${HF_HUB_OFFLINE:-0}"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/health')"]
interval: 10s