feat: offline-first model bundling -- disable HuggingFace downloads at runtime #45
Labels
No labels
compliance
demo
deployment
docs
enhancement
parser
patterns
performance
security
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/turnstone#45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enterprise deployments in air-gapped or compliance-audited environments cannot make outbound HTTPS calls to
huggingface.co. Turnstone must run without any runtime model downloads.Changes needed:
transformers,sentence-transformers, andpipeline()calls for network activity at startup/first-useTURNSTONE_OFFLINE_MODE=1env var that disables or stubs all HF fetchesHF_HOME/HF_HUB_OFFLINEenv vars)scripts/prefetch_models.shhelper that downloads required weights to a local dir for air-gapped transferHF_HUB_OFFLINEandTRANSFORMERS_OFFLINEare respected when setAcceptance criteria:
TURNSTONE_OFFLINE_MODE=1container starts, indexes logs, and serves queries with zero outbound connections.Implemented via
TURNSTONE_OFFLINE_MODE=1env var inapp/rest.py.Sets
HF_HUB_OFFLINE=1andTRANSFORMERS_OFFLINE=1before any HuggingFace library loads — both the classifier (byviz/bylastic_classification_logs) and the embedder (BAAI/bge-small-en-v1.5) are blocked from phoning home. Falls back to pattern-based classifier and skips embedding when model cache is absent.Pre-download commands added to
.env.example. Full air-gap checklist in docs/air-gapped-deployment.md (see #47).