-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
227 lines (209 loc) · 6.06 KB
/
docker-compose.yaml
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
# Base configuration for Atoma services
x-atoma-node-confidential: &atoma-node-confidential
image: ghcr.io/atoma-network/atoma-node:latest
volumes:
- ${CONFIG_PATH:-./config.toml}:/app/config.toml
- ./logs:/app/logs
- sui-config-volume:/root/.sui/sui_config
- ${SUI_CONFIG_PATH:-~/.sui/sui_config}:/tmp/.sui/sui_config
- ./data:/app/data
env_file: .env
networks:
- atoma-network
x-atoma-node-non-confidential: &atoma-node-non-confidential
image: ghcr.io/atoma-network/atoma-node:default
volumes:
- ${CONFIG_PATH:-./config.toml}:/app/config.toml
- ./logs:/app/logs
- sui-config-volume:/root/.sui/sui_config
- ${SUI_CONFIG_PATH:-~/.sui/sui_config}:/tmp/.sui/sui_config
- ./data:/app/data
env_file: .env
networks:
- atoma-network
# Base configuration for cuda inference services
x-inference-service-cuda: &inference-service-cuda
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
- ${HF_CACHE_PATH:-~/.cache/huggingface}:/root/.cache/huggingface
env_file: .env
networks:
- atoma-network
# Base configuration for cpu inference services
x-inference-service-cpu: &inference-service-cpu
volumes:
- ${HF_CACHE_PATH:-~/.cache/huggingface}:/root/.cache/huggingface
env_file: .env
networks:
- atoma-network
# Base configuration for ROCm inference services
x-inference-service-rocm: &inference-service-rocm
runtime: rocm
devices:
- all
volumes:
- ${HF_CACHE_PATH:-~/.cache/huggingface}:/root/.cache/huggingface
env_file: .env
networks:
- atoma-network
services:
postgres-db:
image: postgres:13
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
env_file: .env
networks:
- atoma-network
prometheus:
image: prom/prometheus:latest
restart: always
ports:
- "${PROMETHEUS_PORT:-9090}:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
env_file: .env
networks:
- atoma-network
grafana:
image: grafana/grafana:latest
restart: always
ports:
- "${GRAFANA_PORT:-30001}:30000"
depends_on:
- prometheus
volumes:
- grafana_data:/var/lib/grafana
env_file: .env
networks:
- atoma-network
atoma-node-confidential:
<<: *atoma-node-confidential
ports:
- "${ATOMA_SERVICE_PORT:-3000}:3000"
- "127.0.0.1:${ATOMA_DAEMON_PORT:-3001}:3001"
profiles:
- confidential
depends_on:
postgres-db:
condition: service_started
required: true
vllm:
condition: service_started
required: false
vllm-cpu:
condition: service_started
required: false
vllm-rocm:
condition: service_started
required: false
mistralrs-cpu:
condition: service_started
required: false
tei:
condition: service_started
required: false
mistralrs:
condition: service_started
required: false
atoma-node-non-confidential:
<<: *atoma-node-non-confidential
ports:
- "${ATOMA_SERVICE_PORT:-3000}:3000"
- "127.0.0.1:${ATOMA_DAEMON_PORT:-3001}:3001"
profiles:
- non-confidential
depends_on:
postgres-db:
condition: service_started
required: true
vllm:
condition: service_started
required: false
vllm-cpu:
condition: service_started
required: false
vllm-rocm:
condition: service_started
required: false
mistralrs-cpu:
condition: service_started
required: false
tei:
condition: service_started
required: false
mistralrs:
condition: service_started
required: false
vllm:
<<: *inference-service-cuda
container_name: chat-completions
profiles: [chat_completions_vllm]
image: vllm/vllm-openai:v0.6.5
environment:
# Backend for attention computation
# Available options:
# - "TORCH_SDPA": use torch.nn.MultiheadAttention
# - "FLASH_ATTN": use FlashAttention
# - "XFORMERS": use XFormers
# - "ROCM_FLASH": use ROCmFlashAttention
# - "FLASHINFER": use flashinfer (recommended for fp8 quantized models)
- VLLM_ATTENTION_BACKEND=FLASH_ATTN
ipc: host
command: ${VLLM_ENGINE_ARGS}
vllm-cpu:
<<: *inference-service-cpu
container_name: chat-completions
profiles: [chat_completions_vllm_cpu]
build:
context: https://github.com/atoma-network/vllm.git#main
dockerfile: Dockerfile.cpu
command: --model ${CHAT_COMPLETIONS_MODEL} --max-model-len ${CHAT_COMPLETIONS_MAX_MODEL_LEN}
vllm-rocm:
<<: *inference-service-rocm
container_name: chat-completions
profiles: [chat_completions_vllm_rocm]
build:
context: https://github.com/atoma-network/vllm.git#main
dockerfile: Dockerfile.rocm
command: --model ${CHAT_COMPLETIONS_MODEL} --max-model-len ${CHAT_COMPLETIONS_MAX_MODEL_LEN} --tensor-parallel-size ${VLLM_TENSOR_PARALLEL_SIZE}
mistralrs-cpu:
<<: *inference-service-cpu
container_name: chat-completions
profiles: [chat_completions_mistralrs_cpu]
build:
context: https://github.com/EricLBuehler/mistral.rs.git
dockerfile: Dockerfile
command: plain -m ${CHAT_COMPLETIONS_MODEL}
tei:
<<: *inference-service-cuda
container_name: embeddings
profiles: [embeddings_tei]
image: ${TEI_IMAGE}
command: --model-id ${EMBEDDINGS_MODEL} --huggingface-hub-cache /root/.cache/huggingface/hub
mistralrs:
<<: *inference-service-cuda
container_name: image-generations
profiles: [image_generations_mistralrs]
image: ${MISTRALRS_IMAGE}
command: diffusion-plain -m ${IMAGE_GENERATIONS_MODEL} --arch ${IMAGE_GENERATIONS_ARCHITECTURE}
networks:
atoma-network:
driver: bridge
volumes:
postgres-data:
grafana_data:
sui-config-volume: