-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (95 loc) · 2.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (95 loc) · 2.5 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
services:
postgres:
restart: always
image: postgres
container_name: postgres
expose:
- "${PG_PORT}:5432"
networks:
- backend
environment:
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
- POSTGRES_DATABASE=${PG_DATABASE}
volumes:
- db_data:/var/lib/postgresql/data/
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", "pg_isready", "-p", "${PG_PORT}", "-U", "${PG_USER}"]
interval: 5s
timeout: 5s
retries: 3
minio:
restart: always
image: minio/minio
container_name: minio
volumes:
- minio_data:/data
ports:
- "${MINIO_PORT}:9000"
- "${MINIO_CONSOLE_PORT}:9001"
networks:
- frontend
- backend
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
- MINIO_ADDRESS=${MINIO_ADDRESS}
- MINIO_PORT=${MINIO_PORT}
- MINIO_STORAGE_USE_HTTPS=${MINIO_STORAGE_USE_HTTPS}
- MINIO_CONSOLE_ADDRESS=${MINIO_CONSOLE_ADDRESS}
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
mc:
image: minio/mc
depends_on:
minio:
condition: service_healthy
network_mode: "service:minio"
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb myminio/${MLFLOW_BUCKET_NAME} --ignore-existing;
"
mlflow:
restart: always
build: ./docker/mlflow
image: mlflow
container_name: mlflow
depends_on:
- postgres
- mc
ports:
- "${MLFLOW_PORT}:5000"
networks:
- frontend
- backend
environment:
- AWS_ACCESS_KEY_ID=${MINIO_ROOT_USER}
- AWS_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
- MLFLOW_S3_ENDPOINT_URL=http://minio:${MINIO_PORT}
- MLFLOW_S3_IGNORE_TLS=true
command: >
mlflow server
--backend-store-uri postgresql://${PG_USER}:${PG_PASSWORD}@postgres:${PG_PORT}/${PG_DATABASE}
--host 0.0.0.0
--serve-artifacts
--artifacts-destination s3://${MLFLOW_BUCKET_NAME}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${MLFLOW_PORT}/"]
interval: 30s
timeout: 10s
retries: 3
volumes:
db_data:
minio_data:
networks:
frontend:
driver: bridge
backend:
driver: bridge