-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
96 lines (92 loc) · 2.52 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
services:
db:
restart: always
image: postgres
container_name: mlflow_db
ports:
- "5423:5432"
networks:
- backend
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DATABASE: ${PG_DATABASE}
volumes:
- ./db_data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD", "pg_isready", "-p", "5432", "-U", "${PG_USER}"]
interval: 5s
timeout: 5s
retries: 3
s3:
restart: always
image: minio/minio:RELEASE.2024-07-31T05-46-26Z
container_name: mlflow_minio
ports:
- "9000:9000"
- "9001:9001"
networks:
- frontend
- backend
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
command: server /data --console-address ':9001' --address ':9000'
volumes:
- ./minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
s3_setup:
image: minio/mc:RELEASE.2024-08-13T05-33-17Z
container_name: s3_setup
depends_on:
- s3
networks:
- backend
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
entrypoint: ["/bin/sh", "-c"]
command:
- |
mc alias set myminio http://s3:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
mc admin user svcacct add --access-key ${MLFLOW_AWS_ACCESS_KEY_ID} --secret-key ${MLFLOW_AWS_SECRET_ACCESS_KEY} myminio ${MINIO_ROOT_USER}
mc mb myminio/${MLFLOW_BUCKET_NAME}/artifacts
mc mb myminio/test-bucket
mlflow_server:
restart: always
build: ./server
image: mlflow_server
container_name: mlflow_server
depends_on:
- db
- s3_setup
ports:
- "5050:5000"
networks:
- frontend
- backend
environment:
AWS_ACCESS_KEY_ID: ${MLFLOW_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${MLFLOW_AWS_SECRET_ACCESS_KEY}
MLFLOW_S3_ENDPOINT_URL: http://s3:9000
MLFLOW_S3_IGNORE_TLS: "True"
command: >
mlflow server
--backend-store-uri postgresql://${PG_USER}:${PG_PASSWORD}@db:5432/${PG_DATABASE}
--host 0.0.0.0
--serve-artifacts
--artifacts-destination s3://${MLFLOW_BUCKET_NAME}/artifacts
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
interval: 30s
timeout: 10s
retries: 3
networks:
frontend:
driver: bridge
backend:
driver: bridge