-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
144 lines (132 loc) · 3.61 KB
/
docker-compose.yml
File metadata and controls
144 lines (132 loc) · 3.61 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3.8'
services:
# vLLM Service - LLM inference server
vllm:
image: vllm/vllm-openai:latest
container_name: workerai-vllm
ports:
- "8000:8000"
volumes:
- ./models:/root/.cache/huggingface
environment:
- HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN:-}
command: >
--model meta-llama/Llama-3-70B-Instruct
--host 0.0.0.0
--port 8000
--enable-auto-tool-choice
--tool-call-parser hermes
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- workerai-network
# workerAI Application
workerai:
build:
context: .
dockerfile: Dockerfile
container_name: workerai-app
ports:
- "8001:8001" # Prometheus metrics
- "8002:8002" # Health checks
volumes:
- ./data:/app/data
- ./workspace:/app/workspace
- ./logs:/app/logs
- ./models:/app/models
environment:
# vLLM Configuration
- VLLM_BASE_URL=http://vllm:8000/v1
- VLLM_API_KEY=EMPTY
- VLLM_MODEL_NAME=meta-llama/Llama-3-70B-Instruct
# Application Configuration
- ENVIRONMENT=production
- LOG_LEVEL=INFO
- LOG_JSON_FORMAT=true
- VERBOSE=false
# Timeouts and Limits
- LLM_TIMEOUT_SECONDS=60
- LLM_CONNECT_TIMEOUT=10
- LLM_READ_TIMEOUT=120
- LLM_MAX_RETRIES=3
- MAX_ITERATIONS=20
# Circuit Breaker
- CIRCUIT_BREAKER_FAIL_MAX=5
- CIRCUIT_BREAKER_TIMEOUT_SECONDS=60
# Web Scraping
- WEB_REQUESTS_PER_MINUTE=30
- WEB_REQUESTS_PER_DOMAIN_PER_MINUTE=10
- PLAYWRIGHT_HEADLESS=true
# Paths
- WORKING_DIRECTORY=/app/workspace
- CHROMA_PERSIST_DIRECTORY=/app/data/chroma_db
- EMBEDDING_MODEL_CACHE_DIR=/app/models
- LOG_FILE=/app/logs/workerai.log
# Email (optional - set if using email tools)
- SMTP_SERVER=${SMTP_SERVER:-smtp.gmail.com}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USERNAME=${SMTP_USERNAME:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
- IMAP_SERVER=${IMAP_SERVER:-imap.gmail.com}
- IMAP_PORT=${IMAP_PORT:-993}
- IMAP_USERNAME=${IMAP_USERNAME:-}
- IMAP_PASSWORD=${IMAP_PASSWORD:-}
depends_on:
vllm:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- workerai-network
# Prometheus (optional - for metrics collection)
prometheus:
image: prom/prometheus:latest
container_name: workerai-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
networks:
- workerai-network
profiles:
- monitoring
# Grafana (optional - for metrics visualization)
grafana:
image: grafana/grafana:latest
container_name: workerai-grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
networks:
- workerai-network
profiles:
- monitoring
networks:
workerai-network:
driver: bridge
volumes:
prometheus-data:
grafana-data: