-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (107 loc) · 2.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
115 lines (107 loc) · 2.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
version: '3.8'
services:
# SOLLOL Gateway (Drop-in replacement - listens on port 11434)
sollol:
build: .
ports:
- "11434:11434" # Drop-in replacement for Ollama
- "9090:9090" # Prometheus metrics
environment:
- RAY_WORKERS=4
- DASK_WORKERS=4
- SOLLOL_AUTH_ENABLED=false # Set to true for production
- SOLLOL_PORT=11434
volumes:
- ./config/hosts.txt:/app/config/hosts.txt
- sollol-data:/app/data
networks:
- sollol-network
restart: unless-stopped
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4G
depends_on:
- ollama-node-1
- ollama-node-2
# Ollama Node 1 (GPU - if available) - Backend on different port
ollama-node-1:
image: ollama/ollama:latest
ports:
- "11435:11434" # Backend node
volumes:
- ollama-models-1:/root/.ollama
networks:
- sollol-network
restart: unless-stopped
# Uncomment for GPU support:
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
# Ollama Node 2 (CPU) - Backend on different port
ollama-node-2:
image: ollama/ollama:latest
ports:
- "11436:11434" # Backend node
volumes:
- ollama-models-2:/root/.ollama
networks:
- sollol-network
restart: unless-stopped
# Ollama Node 3 (CPU) - Backend on different port
ollama-node-3:
image: ollama/ollama:latest
ports:
- "11437:11434" # Backend node
volumes:
- ollama-models-3:/root/.ollama
networks:
- sollol-network
restart: unless-stopped
# Prometheus (Metrics)
prometheus:
image: prom/prometheus:latest
ports:
- "9091:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
networks:
- sollol-network
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: unless-stopped
# Grafana (Visualization)
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SERVER_ROOT_URL=http://localhost:3000
volumes:
- grafana-data:/var/lib/grafana
networks:
- sollol-network
depends_on:
- prometheus
restart: unless-stopped
volumes:
sollol-data:
ollama-models-1:
ollama-models-2:
ollama-models-3:
prometheus-data:
grafana-data:
networks:
sollol-network:
driver: bridge