-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.worker.yml
More file actions
39 lines (37 loc) · 1.17 KB
/
docker-compose.worker.yml
File metadata and controls
39 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# LMStack Worker Docker Compose Configuration
# Usage on GPU nodes: docker compose -f docker-compose.worker.yml up -d
#
# Prerequisites:
# - Docker installed
# - NVIDIA Container Toolkit installed
# - Network access to LMStack backend
version: '3.8'
services:
worker:
build:
context: ./worker
dockerfile: Dockerfile
container_name: lmstack-worker
environment:
BACKEND_URL: ${BACKEND_URL:-http://localhost:52000}
WORKER_TOKEN: ${WORKER_TOKEN:-}
WORKER_NAME: ${WORKER_NAME:-gpu-worker}
AGENT_PORT: ${AGENT_PORT:-52001}
volumes:
# Docker socket for container management
- /var/run/docker.sock:/var/run/docker.sock
# HuggingFace model cache (optional, for persistence)
- ${HF_CACHE_DIR:-~/.cache/huggingface}:/root/.cache/huggingface
ports:
- "${AGENT_PORT:-52001}:${AGENT_PORT:-52001}"
# GPU support - requires NVIDIA Container Toolkit
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
# Privileged mode required for Docker-in-Docker operations
privileged: true