For production-scale deployments, Unmute uses Docker Swarm. All commands should be executed from a client machine within the repository directory, not directly on the swarm nodes.
Initial Node Setup
If you are setting up a new machine, first transfer and run the setup script:
# On your client machine
scp setup_gpu_swarm_node.py llm-wrapper-gpu000:/root/
ssh llm-wrapper-gpu000 python3 /root/setup_gpu_swarm_node.py
Initializing the Swarm
To declare a node as the manager (only if a swarm is not already running):
docker -H ssh://llm-wrapper-gpu000 swarm init
Connecting Workers
To add a new worker node to an existing manager:
- On the manager, retrieve the join token:
docker -H ssh://llm-wrapper-gpu000 swarm join-token worker - Run the resulting command on the new worker node.
Running the Deployment
Before running the bake scripts, ensure the following environment variables are set:
HUGGING_FACE_HUB_TOKEN: Required to access gated models (e.g., google/gemma-3-12b-it).PROVIDERS_GOOGLE_CLIENT_SECRET: Required for authentication to observability services (Grafana, Traefik).NEWSAPI_API_KEY: (Optional) Used for the "Dev (news)" character.
Execute the deployment using:
./bake_deploy_prod.sh
# OR
./bake_deploy_staging.sh
# If new machine
scp setup_gpu_swarm_node.py llm-wrapper-gpu000:/root/
ssh llm-wrapper-gpu000 python3 /root/setup_gpu_swarm_node.py
# Manager only
docker -H ssh://llm-wrapper-gpu000 swarm init
# Connect worker
docker -H ssh://llm-wrapper-gpu000 swarm join-token worker
./bake_deploy_prod.sh