little-yacht-94602
03/04/2026, 3:54 AMtall-airline-16756
03/04/2026, 3:54 AMtall-airline-16756
03/04/2026, 3:54 AMexport HF_HUB_CACHE=/models
• Or set the environment variable in your container runtime.
1. Mount that directory as a Docker volume so it maps to a host path (separate volume/hard disk).
◦ Example Docker Compose snippet:
services:
livekit-agent:
environment:
- HF_HUB_CACHE=/models
volumes:
- ./local-models:/models
• This maps host ./local-models (which can be on a separate mounted disk) to /models in the container.
1. Ensure file permissions allow the agent process to write to the mounted directory.
Notes and clarifications
• The LiveKit Server SDK does not download or cache models. The Agents framework and plugins that use external models (Hugging Face, etc.) perform downloads and honor HF_HUB_CACHE.
• Setting HF_HUB_CACHE ensures Hugging Face’s huggingface_hub library (used by agents/plugins like the turn detector) writes model files to your chosen path.
If you’d like, I can:
• Provide a full Dockerfile + docker-compose example tailored to your setup.
• Show how to set the environment variable for a single container run (docker run) or for Kubernetes (a ConfigMap/volume mount example).
• Help verify the correct path for a specific LiveKit Agent or plugin you’re running — which plugin or agent are you using (for example, turn-detector or another plugin)? Sources: Updating the Turn Detector Model | LiveKit