-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (90 loc) · 3.06 KB
/
docker-compose.yml
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
version: '3.7'
services:
minio:
restart: always
image: minio/minio@sha256:6d6cf693fd70ca6e15709fa44d39b44f98fc5b58795697486a95ac1cc2ad9880
container_name: mlflow_s3
ports:
- "9000:9000"
- "9001:9001"
command: server /data --console-address ':9001' --address ':9000'
environment:
- MINIO_ROOT_USER=${AWS_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY}
volumes:
- minio_data:/data
mc:
image: minio/mc@sha256:3455a7bae6058ea83f797a95c0e29a4daedff6f79b1f87a0ede429e0344734ab
depends_on:
- minio
container_name: mc
env_file:
- .env
entrypoint: >
/bin/sh -c "
/tmp/wait-for-it.sh minio:9000 &&
/usr/bin/mc alias set minio http://minio:9000 ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} &&
/usr/bin/mc mb minio/mlflow;
exit 0;
"
volumes:
- ./wait-for-it.sh:/tmp/wait-for-it.sh
db:
restart: always
image: mysql/mysql-server@sha256:5b40d96b11333570143d98d3a74100fefadb9abb17b27a95dbc9ad33544ec142
container_name: mlflow_db
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- dbdata:/var/lib/mysql
tracking:
restart: always
build: ./mlflow_tracking
image: mlflow_server
container_name: mlflow_server
depends_on:
- mc
- db
ports:
- "5000:5000"
volumes:
- ./mlflow_tracking:/app
environment:
- MLFLOW_TRACKING_URI=http://localhost:5000
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
command: >
bash -c "
mlflow server --backend-store-uri mysql+pymysql://${MYSQL_USER}:${MYSQL_PASSWORD}@db:3306/${MYSQL_DATABASE} --default-artifact-root s3://mlflow/ --host 0.0.0.0
&& python load_dataset.py
"
client:
restart: always
build: ./mlflow_client
image: mlflow_client
container_name: mlflow_client
ports:
- "8888:8888"
- "8000:8000"
volumes:
- ./mlflow_client:/app
environment:
- ALGORITHM=HS256
- ORIGIN=https://dashboard.petwin.org
- ROOT_PATH=/
- MLFLOW_TRACKING_URI=http://tracking:5000
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
command: uvicorn app.main:app --host=0.0.0.0 --port=8000 --reload
stdin_open: true
tty: true
volumes:
dbdata:
minio_data: