-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (92 loc) · 2.92 KB
/
docker-compose.yml
File metadata and controls
98 lines (92 loc) · 2.92 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
services:
minio:
restart: always
image: quay.io/minio/minio:${MINIO_VERSION}
container_name: mlflow_s3
expose:
- "9000"
command: ["server", "/data", "--console-address", ":9001"]
networks:
- storage
environment:
- MINIO_ROOT_USER=${AWS_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY}
volumes:
- minio_data:/data
create_mlflow_bucket:
image: quay.io/minio/mc:${MINIO_MC_VERSION}
depends_on:
- minio
container_name: create_mlflow_bucket
networks:
- storage
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set minio http://minio:9000 ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY}) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb --ignore-existing minio/${MLFLOW_BUCKET_NAME};
/usr/bin/mc anonymous set public minio/${MLFLOW_BUCKET_NAME};
/usr/bin/mc mb --ignore-existing minio/${DATA_REPO_BUCKET_NAME};
/usr/bin/mc anonymous set download minio/${DATA_REPO_BUCKET_NAME};
exit 0; "
postgres:
restart: always
image: postgres:${POSTGRES_VERSION}
container_name: mlflow_db
expose:
- "5432"
networks:
- backend
environment:
- POSTGRES_DB=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
mlflow:
restart: always
build:
context: ./mlflow
args:
PYTHON_VERSION: ${PYTHON_VERSION}
MLFLOW_VERSION: ${MLFLOW_VERSION}
image: mlflow_server
container_name: mlflow_server
expose:
- "5000"
networks:
- frontend
- backend
- storage
environment:
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
command: mlflow server --backend-store-uri postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DATABASE} --default-artifact-root s3://mlflow/ --host 0.0.0.0
nginx:
restart: always
build:
context: ./nginx
args:
NGINX_VERSION: ${NGINX_VERSION}
image: mlflow_nginx
container_name: mlflow_nginx
ports:
- "80:80"
- "9000:9000"
- "9001:9001"
networks:
- frontend
- storage
depends_on:
- mlflow
- minio
networks:
frontend:
driver: bridge
backend:
driver: bridge
storage:
driver: bridge
volumes:
postgres_data:
minio_data: