-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
180 lines (165 loc) · 4.7 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
# Base configuration for Atoma services
x-atoma-node: &atoma-node
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
# 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:
<<: *atoma-node
ports:
- "${ATOMA_SERVICE_PORT:-3000}:3000"
- "127.0.0.1:${ATOMA_DAEMON_PORT:-3001}:3001"
profiles:
- chat_completions_vllm
- chat_completions_vllm_cpu
- chat_completions_vllm_rocm
- chat_completions_mistralrs_cpu
- embeddings_tei
- image_generations_mistralrs
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
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: