-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.amd64.nornicdb.yml
More file actions
331 lines (309 loc) · 12.3 KB
/
docker-compose.amd64.nornicdb.yml
File metadata and controls
331 lines (309 loc) · 12.3 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
services:
nornicdb:
build:
context: ./nornicdb
dockerfile: Dockerfile.cuda
tags:
- timothyswt/nornicdb:cuda
image: timothyswt/nornicdb:cuda
container_name: nornicdb
ports:
- "7474:7474" # HTTP API & Browser UI
- "7687:7687" # Bolt protocol (Neo4j compatible)
volumes:
- ./data/nornicdb:/data
- ./data/nornicdb/export:/data/export # For loading Mimir exports
environment:
- NORNICDB_DATA_DIR=/data
- NORNICDB_HTTP_PORT=7474
- NORNICDB_BOLT_PORT=7687
# - NORNICDB_EMBEDDING_URL=http://llama-server:8080
# - NORNICDB_EMBEDDING_MODEL=bge-m3
# - NORNICDB_EMBEDDING_DIM=1024
# # Authentication (disabled by default for dev)
- NORNICDB_NO_AUTH=${NORNICDB_NO_AUTH:-true}
- NORNICDB_ADMIN_PASSWORD=${NEO4J_PASSWORD:-password}
# Load export data on startup (disabled - starting fresh)
- NORNICDB_LOAD_EXPORT=
# GPU Configuration (auto-detected, can override)
- NORNICDB_GPU_ENABLED=${NORNICDB_GPU_ENABLED:-true}
- NORNICDB_GPU_DEVICE_ID=${NORNICDB_GPU_DEVICE_ID:-0}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --spider -q http://localhost:7474/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
depends_on:
llama-server:
condition: service_healthy
networks:
- mcp_network
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu, compute, utility]
copilot-api:
image: timothyswt/copilot-api:latest
container_name: copilot_api_server
ports:
- "4141:4141" # Fixed: copilot-api listens on 4141, not 3000
volumes:
- ./copilot-data:/root/.local/share/copilot-api # Persist GitHub token
environment:
- NODE_ENV=production
# Remove PORT=3000, the app uses 4141 by default
restart: unless-stopped
healthcheck:
# Use CMD-SHELL so shell operators (||) work and allow a proper HTTP probe
test: ["CMD-SHELL", "wget --spider -q http://localhost:4141/ || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
networks:
- mcp_network
# Ollama (Legacy - kept for reference, can be removed)
# ollama:
# build:
# context: ./docker/ollama
# dockerfile: Dockerfile
# args:
# - EMBEDDING_MODEL=${MIMIR_EMBEDDINGS_MODEL:-bge-m3}
# tags:
# - mimir-ollama:${VERSION:-1.0.0}
# - mimir-ollama:latest
# image: mimir-ollama:${VERSION:-1.0.0}
# container_name: ollama_server
# ports:
# - "11434:11434"
# volumes:
# - type: bind
# source: ollama_models
# target: /root/.ollama
# environment:
# - OLLAMA_HOST=0.0.0.0:11434
# - OLLAMA_ORIGINS=*
# restart: unless-stopped
# healthcheck:
# test: ["CMD", "ollama", "list"]
# interval: 10s
# timeout: 5s
# retries: 5
# start_period: 30s
# networks:
# - mcp_network
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# llama.cpp server - OpenAI-compatible embeddings
llama-server:
image: timothyswt/llama-cpp-server-amd64-mxbai-cuda:latest
container_name: llama_server
ports:
- "11434:8080" # External 11434 -> Internal 8080 (llama.cpp default)
# Note: Model is bundled in the image (bge-m3, 1024 dims)
# No volumes needed unless you want to add additional models
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- mcp_network
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# llama.cpp Vision Server - 2B model (faster, lower memory)
# Qwen2.5-VL 2B with vision understanding and CUDA acceleration
# Build with: npm run llama:build-qwen-2b-cuda
# For use without cuda `image: timothyswt/llama-cpp-server-amd64-qwen-vl-2b:latest`
#
# llama-vl-server-2b:
# image: timothyswt/llama-cpp-server-amd64-qwen-vl-2b-cuda:latest
# container_name: llama_server_vision_2b
# ports:
# - "8081:8080" # Vision 2B API endpoint
# restart: unless-stopped
# healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 60s # Vision models take longer to load
# networks:
# - mcp_network
# deploy:
# resources:
# limits:
# memory: 8G # 2B model + vision projector
# reservations:
# memory: 4G
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# llama.cpp Vision Server - 7B model (higher quality, more memory)
# Qwen2.5-VL 7B with vision understanding and CUDA acceleration
# Build with: npm run llama:build-qwen-7b-cuda
# For use without cuda `image: timothyswt/llama-cpp-server-amd64-qwen-vl-7b:latest`
#
# llama-vl-server-7b:
# image: timothyswt/llama-cpp-server-amd64-qwen-vl-7b-cuda:latest
# container_name: llama_server_vision_7b
# ports:
# - "8082:8080" # Vision 7B API endpoint
# restart: unless-stopped
# healthcheck:
# test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 90s # Larger models take even longer
# networks:
# - mcp_network
# deploy:
# resources:
# limits:
# memory: 16G # 7B models need more RAM
# reservations:
# memory: 8G
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
mimir-server:
build:
context: .
dockerfile: Dockerfile
tags:
- mimir-server:${VERSION:-1.0.0}
- mimir-server:latest
image: mimir-server:${VERSION:-1.0.0}
container_name: mimir_server
restart: unless-stopped
environment:
# Database Configuration
- NEO4J_URI=bolt://nornicdb:7687
- NEO4J_USER=admin
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-admin}
# Server Configuration
- NODE_ENV=production
- PORT=3000
# - NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED:-1}
# Workspace Configuration
- WORKSPACE_ROOT=/workspace
- HOST_WORKSPACE_ROOT=${HOST_WORKSPACE_ROOT} # Pass through from host
- HOST_HOME=${HOME} # Host's home directory for expanding ~ in HOST_WORKSPACE_ROOT
# LLM API Configuration
- MIMIR_DEFAULT_PROVIDER=${MIMIR_DEFAULT_PROVIDER:-copilot}
- MIMIR_LLM_API=${MIMIR_LLM_API:-http://copilot-api:4141}
- MIMIR_LLM_API_PATH=${MIMIR_LLM_API_PATH:-/v1/chat/completions}
- MIMIR_LLM_API_MODELS_PATH=${MIMIR_LLM_API_MODELS_PATH:-/v1/models}
- MIMIR_LLM_API_KEY=${MIMIR_LLM_API_KEY:-dummy-key}
# PCTX Integration (Code Mode for 90-98% token reduction)
- PCTX_URL=${PCTX_URL:-http://host.docker.internal:8080}
- PCTX_ENABLED=${PCTX_ENABLED:-false}
# Provider and Model Configuration (100% dynamic - no config file needed)
- MIMIR_DEFAULT_MODEL=${MIMIR_DEFAULT_MODEL:-gpt-4.1}
# Per-Agent Model Configuration (optional overrides)
- MIMIR_PM_MODEL=${MIMIR_PM_MODEL:-}
- MIMIR_WORKER_MODEL=${MIMIR_WORKER_MODEL:-}
- MIMIR_QC_MODEL=${MIMIR_QC_MODEL:-}
# Context Window Configuration
- MIMIR_DEFAULT_CONTEXT_WINDOW=${MIMIR_DEFAULT_CONTEXT_WINDOW:-128000}
# Embeddings API Configuration
- MIMIR_EMBEDDINGS_PROVIDER=${MIMIR_EMBEDDINGS_PROVIDER:-openai}
- MIMIR_EMBEDDINGS_API=${MIMIR_EMBEDDINGS_API:-http://llama-server:8080}
- MIMIR_EMBEDDINGS_API_PATH=${MIMIR_EMBEDDINGS_API_PATH:-/v1/embeddings}
- MIMIR_EMBEDDINGS_API_MODELS_PATH=${MIMIR_EMBEDDINGS_API_MODELS_PATH:-/v1/models}
- MIMIR_EMBEDDINGS_API_KEY=${MIMIR_EMBEDDINGS_API_KEY:-dummy-key}
# Embeddings Configuration
- MIMIR_EMBEDDINGS_ENABLED=${MIMIR_EMBEDDINGS_ENABLED:-true}
- MIMIR_EMBEDDINGS_MODEL=${MIMIR_EMBEDDINGS_MODEL:-bge-m3}
- MIMIR_EMBEDDINGS_DIMENSIONS=${MIMIR_EMBEDDINGS_DIMENSIONS:-1024}
- MIMIR_EMBEDDINGS_CHUNK_SIZE=${MIMIR_EMBEDDINGS_CHUNK_SIZE:-768}
- MIMIR_EMBEDDINGS_CHUNK_OVERLAP=${MIMIR_EMBEDDINGS_CHUNK_OVERLAP:-100}
- MIMIR_EMBEDDINGS_DELAY_MS=${MIMIR_EMBEDDINGS_DELAY_MS:-0}
- MIMIR_EMBEDDINGS_MAX_RETRIES=${MIMIR_EMBEDDINGS_MAX_RETRIES:-3}
# Image Embeddings Control (disabled by default for safety)
- MIMIR_EMBEDDINGS_IMAGES=${MIMIR_EMBEDDINGS_IMAGES:-false} # Default: disabled
- MIMIR_EMBEDDINGS_IMAGES_DESCRIBE_MODE=${MIMIR_EMBEDDINGS_IMAGES_DESCRIBE_MODE:-true} # Default: VL description mode
# Qwen2.5-VL Configuration (for llama.cpp server)
- MIMIR_EMBEDDINGS_VL_PROVIDER=${MIMIR_EMBEDDINGS_VL_PROVIDER:-llama.cpp}
- MIMIR_EMBEDDINGS_VL_API=${MIMIR_EMBEDDINGS_VL_API:-http://llama-vl-server-2b:8080}
- MIMIR_EMBEDDINGS_VL_API_PATH=${MIMIR_EMBEDDINGS_VL_API_PATH:-/v1/chat/completions}
- MIMIR_EMBEDDINGS_VL_API_KEY=${MIMIR_EMBEDDINGS_VL_API_KEY:-dummy-key}
- MIMIR_EMBEDDINGS_VL_MODEL=${MIMIR_EMBEDDINGS_VL_MODEL:-qwen2.5-vl}
- MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE=${MIMIR_EMBEDDINGS_VL_CONTEXT_SIZE:-131072} # 128K tokens (7b/72b)
- MIMIR_EMBEDDINGS_VL_MAX_TOKENS=${MIMIR_EMBEDDINGS_VL_MAX_TOKENS:-2048} # Max description length
- MIMIR_EMBEDDINGS_VL_TEMPERATURE=${MIMIR_EMBEDDINGS_VL_TEMPERATURE:-0.7}
- MIMIR_EMBEDDINGS_VL_DIMENSIONS=${MIMIR_EMBEDDINGS_VL_DIMENSIONS:-768} # Falls back to text model dims
- MIMIR_EMBEDDINGS_VL_TIMEOUT=${MIMIR_EMBEDDINGS_VL_TIMEOUT:-180000} # 3 minutes (VL processing is slow)
# Indexing Configuration
- MIMIR_INDEXING_THREADS=${MIMIR_INDEXING_THREADS:-1}
# Feature Flags
- MIMIR_FEATURE_PM_MODEL_SUGGESTIONS=${MIMIR_FEATURE_PM_MODEL_SUGGESTIONS:-true}
- MIMIR_AUTO_INDEX_DOCS=${MIMIR_AUTO_INDEX_DOCS:-true}
# Security Configuration
- MIMIR_ENABLE_SECURITY=${MIMIR_ENABLE_SECURITY:-false}
- MIMIR_DEV_USER_ADMIN=${MIMIR_DEV_USER_ADMIN}
- MIMIR_DEV_USER_DEVELOPER=${MIMIR_DEV_USER_DEVELOPER}
- MIMIR_DEV_USER_ANALYST=${MIMIR_DEV_USER_ANALYST}
- MIMIR_DEV_USER_VIEWER=${MIMIR_DEV_USER_VIEWER}
- MIMIR_JWT_SECRET=${MIMIR_JWT_SECRET}
# OAuth Configuration (explicit endpoint URLs - provider-specific)
- MIMIR_AUTH_PROVIDER=${MIMIR_AUTH_PROVIDER}
- MIMIR_OAUTH_AUTHORIZATION_URL=${MIMIR_OAUTH_AUTHORIZATION_URL} # Full authorization endpoint URL
- MIMIR_OAUTH_TOKEN_URL=${MIMIR_OAUTH_TOKEN_URL} # Full token endpoint URL
- MIMIR_OAUTH_USERINFO_URL=${MIMIR_OAUTH_USERINFO_URL} # Full userinfo endpoint URL
- MIMIR_OAUTH_CLIENT_ID=${MIMIR_OAUTH_CLIENT_ID}
- MIMIR_OAUTH_CLIENT_SECRET=${MIMIR_OAUTH_CLIENT_SECRET}
- MIMIR_OAUTH_CALLBACK_URL=${MIMIR_OAUTH_CALLBACK_URL}
- MIMIR_OAUTH_ALLOW_HTTP=${MIMIR_OAUTH_ALLOW_HTTP}
# Advanced Configuration
- MIMIR_PARALLEL_EXECUTION=${MIMIR_PARALLEL_EXECUTION:-false}
- MIMIR_INSTALL_DIR=${MIMIR_INSTALL_DIR:-/app}
- MIMIR_AGENTS_DIR=${MIMIR_AGENTS_DIR:-/app/docs/agents}
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ${HOST_WORKSPACE_ROOT:-~/src}:${WORKSPACE_ROOT:-/workspace}
ports:
- "9042:3000"
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => process.exit(res.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
depends_on:
nornicdb:
condition: service_healthy
copilot-api:
condition: service_healthy
# llama.cpp server for embeddings
llama-server:
condition: service_healthy
# llama.cpp server for image embeddings must set
# llama-vl-server:
# condition: service_healthy
networks:
- mcp_network
networks:
mcp_network:
driver: bridge