-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
226 lines (217 loc) · 5.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
226 lines (217 loc) · 5.47 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
services:
online-api:
build:
context: .
dockerfile: Dockerfile.backend
environment:
DATA_DIR: /app/data/ml-1m
ARTIFACT_DIR: /app/artifacts/latest
FEEDBACK_BACKEND: postgres
CORS_ORIGINS: http://localhost:8080
REDIS_URL: redis://redis:6379/0
POSTGRES_DSN: postgresql://recsys:recsys@postgres:5432/recsys
MILVUS_HOST: milvus
MILVUS_PORT: "19530"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: recsys-models
USE_ONLINE_STORES: "true"
volumes:
- ./data:/app/data
- ./artifacts:/app/artifacts
depends_on:
offline-bootstrap:
condition: service_completed_successfully
redis:
condition: service_healthy
postgres:
condition: service_healthy
milvus:
condition: service_started
minio:
condition: service_started
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 10s
timeout: 3s
retries: 5
offline-runner:
build:
context: .
dockerfile: Dockerfile.backend
profiles: ["offline"]
command:
[
"python",
"scripts/train.py",
"--data-dir",
"/app/data/ml-1m",
"--output",
"/app/artifacts/latest"
]
environment:
DATA_DIR: /app/data/ml-1m
ARTIFACT_DIR: /app/artifacts/latest
REDIS_URL: redis://redis:6379/0
POSTGRES_DSN: postgresql://recsys:recsys@postgres:5432/recsys
MILVUS_HOST: milvus
MILVUS_PORT: "19530"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: recsys-models
PUBLISH_ONLINE_STORES: "true"
volumes:
- ./data:/app/data
- ./artifacts:/app/artifacts
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
milvus:
condition: service_started
minio:
condition: service_started
offline-bootstrap:
build:
context: .
dockerfile: Dockerfile.backend
command: ["python", "scripts/bootstrap_demo.py"]
environment:
DATA_DIR: /app/data/ml-1m
ARTIFACT_DIR: /app/artifacts/latest
REDIS_URL: redis://redis:6379/0
POSTGRES_DSN: postgresql://recsys:recsys@postgres:5432/recsys
MILVUS_HOST: milvus
MILVUS_PORT: "19530"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: recsys-models
PUBLISH_ONLINE_STORES: "true"
volumes:
- ./data:/app/data
- ./artifacts:/app/artifacts
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
milvus:
condition: service_started
minio:
condition: service_started
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
VITE_API_URL: ""
depends_on:
online-api:
condition: service_healthy
ports:
- "8080:80"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/"]
interval: 10s
timeout: 3s
retries: 5
e2e-verify:
image: python:3.11-slim
profiles: ["verify"]
working_dir: /app
command:
[
"python",
"scripts/verify_demo.py",
"--frontend-url",
"http://frontend",
"--api-url",
"http://online-api:8000",
"--timeout",
"180"
]
volumes:
- ./scripts:/app/scripts:ro
depends_on:
frontend:
condition: service_healthy
online-api:
condition: service_healthy
redis:
image: redis:7.4-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: recsys
POSTGRES_USER: recsys
POSTGRES_PASSWORD: recsys
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U recsys -d recsys"]
interval: 10s
timeout: 3s
retries: 5
etcd:
image: quay.io/coreos/etcd:v3.5.18
environment:
ETCD_AUTO_COMPACTION_MODE: revision
ETCD_AUTO_COMPACTION_RETENTION: "1000"
ETCD_QUOTA_BACKEND_BYTES: "4294967296"
ETCD_SNAPSHOT_COUNT: "50000"
command:
[
"etcd",
"-advertise-client-urls=http://127.0.0.1:2379",
"-listen-client-urls=http://0.0.0.0:2379",
"--data-dir=/etcd"
]
volumes:
- etcd-data:/etcd
minio:
image: minio/minio:latest
command: server /minio_data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/minio_data
milvus:
image: milvusdb/milvus:v2.6.4
command: ["milvus", "run", "standalone"]
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
MINIO_ACCESS_KEY_ID: minioadmin
MINIO_SECRET_ACCESS_KEY: minioadmin
ports:
- "19530:19530"
- "9091:9091"
volumes:
- milvus-data:/var/lib/milvus
depends_on:
- etcd
- minio
volumes:
postgres-data:
etcd-data:
minio-data:
milvus-data: