-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (184 loc) · 4.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
191 lines (184 loc) · 4.78 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
services:
ollama:
image: ollama/ollama:latest
container_name: ollama-brain
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
environment:
OLLAMA_NUM_PARALLEL: 2 # Allow 2 simultaneous requests
OLLAMA_KEEP_ALIVE: 30m # Keep models loaded longer for responsiveness
OLLAMA_DEBUG: 0
command: serve
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: '3.0' # Allow Ollama to use up to 3 cores
memory: 12G # Plenty of room for models
restart: unless-stopped
networks:
- zeroclaw-network
zeroclaw:
build:
context: ./vendor/zeroclaw
dockerfile: Dockerfile
target: dev
args:
ZEROCLAW_CARGO_FEATURES: ""
container_name: zeroclaw
depends_on:
ollama:
condition: service_healthy
environment:
API_KEY: http://ollama-brain:11434
OLLAMA_API_KEY: http://ollama-brain:11434
ZEROCLAW_PROVIDER_URL: http://ollama-brain:11434
PROVIDER: ollama
ZEROCLAW_MODEL: ${ZEROCLAW_MODEL:-phi4-mini}
ZEROCLAW_GATEWAY_PORT: ${ZEROCLAW_GATEWAY_PORT:-42617}
ZEROCLAW_ALLOW_PUBLIC_BIND: "true"
RUST_LOG: ${RUST_LOG:-info}
command: ["gateway", "start", "--port", "${ZEROCLAW_GATEWAY_PORT:-42617}", "--host", "[::]"]
volumes:
- ./workspace/zeroclaw-data:/zeroclaw-data
ports:
- "${HOST_PORT:-42617}:${ZEROCLAW_GATEWAY_PORT:-42617}"
restart: unless-stopped
healthcheck:
test: ["CMD", "zeroclaw", "status", "--format=exit-code"]
interval: 60s
timeout: 10s
retries: 3
start_period: 15s
deploy:
resources:
limits:
cpus: '1.0'
memory: 2G # Increased memory for gateway
networks:
- zeroclaw-network
coordinator:
build:
context: ./agents
dockerfile: Dockerfile
container_name: zeroclaw-coordinator
environment:
ROLE: coordinator
ZEROCLAW_URL: http://zeroclaw:42617
ZEROCLAW_MODEL: ${ZEROCLAW_MODEL_COORDINATOR:-phi4-mini}
OLLAMA_URL: http://ollama-brain:11434
ZEROCLAW_API_ENDPOINT: http://ollama-brain:11434
WORKSPACE_DIR: /workspace
volumes:
- ./workspace:/workspace
ports:
- "8001:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '3.0'
memory: 512M
restart: unless-stopped
networks:
- zeroclaw-network
coder:
build:
context: ./agents
dockerfile: Dockerfile
container_name: zeroclaw-coder
environment:
ROLE: coder
ZEROCLAW_MODEL: ${ZEROCLAW_MODEL_CODER:-phi4-mini}
WORKSPACE_DIR: /workspace
volumes:
- ./workspace:/workspace
ports:
- "8002:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '1.0' # Increased from 0.25
memory: 512M
restart: unless-stopped
networks:
- zeroclaw-network
deployer:
build:
context: ./agents
dockerfile: Dockerfile
container_name: zeroclaw-deployer
environment:
ROLE: deployer
ZEROCLAW_MODEL: ${ZEROCLAW_MODEL_DEPLOYER:-phi4-mini}
WORKSPACE_DIR: /workspace
volumes:
- ./workspace:/workspace
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8003:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 20s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.5' # Increased from 0.25
memory: 256M
restart: unless-stopped
networks:
- zeroclaw-network
tester:
build:
context: ./agents
dockerfile: Dockerfile
container_name: zeroclaw-tester
environment:
ROLE: tester
ZEROCLAW_MODEL: ${ZEROCLAW_MODEL_TESTER:-tinyllama}
WORKSPACE_DIR: /workspace
volumes:
- ./workspace:/workspace
ports:
- "8004:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.5' # Increased from 0.125
memory: 128M
restart: unless-stopped
networks:
- zeroclaw-network
networks:
zeroclaw-network:
driver: bridge
volumes:
ollama-data:
driver: local