-
Notifications
You must be signed in to change notification settings - Fork 88
/
docker-compose.yml
96 lines (96 loc) · 2.71 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.9"
services:
s3:
image: minio/minio:RELEASE.2023-11-01T18-37-25Z
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=${AWS_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY}
command: server /data --console-address ":9001"
networks:
- internal
- public
volumes:
- minio_new_volume:/data
db:
image: mysql:8-oracle # -oracle tag supports arm64 architecture!
restart: unless-stopped
container_name: mlflow_db
expose:
- "3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- db_new_volume:/var/lib/mysql
networks:
- internal
mlflow:
image: ubuntu/mlflow:2.1.1_1.0-22.04
container_name: tracker_mlflow
restart: unless-stopped
ports:
- "5000:5000"
environment:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_DEFAULT_REGION=${AWS_REGION}
- MLFLOW_S3_ENDPOINT_URL=http://s3:9000
networks:
- public
- internal
entrypoint: mlflow server --backend-store-uri mysql+pymysql://${MYSQL_USER}:${MYSQL_PASSWORD}@db:3306/${MYSQL_DATABASE} --default-artifact-root s3://${AWS_BUCKET_NAME}/ --artifacts-destination s3://${AWS_BUCKET_NAME}/ -h 0.0.0.0
depends_on:
wait-for-db:
condition: service_completed_successfully
create_s3_buckets:
image: minio/mc
depends_on:
- "s3"
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set minio http://s3:9000 '${AWS_ACCESS_KEY_ID}' '${AWS_SECRET_ACCESS_KEY}') do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb minio/${AWS_BUCKET_NAME};
exit 0;
"
networks:
- internal
wait-for-db:
image: atkrad/wait4x
depends_on:
- db
command: tcp db:3306 -t 90s -i 250ms
networks:
- internal
run_test_experiment:
build:
context: ./test_experiment
dockerfile: Dockerfile
platform: linux/amd64 # once continuumio/miniconda3:latest image work on native aarch64 (arm), remove this line
depends_on:
- "mlflow"
environment:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_DEFAULT_REGION=${AWS_REGION}
- MLFLOW_S3_ENDPOINT_URL=http://s3:9000
- MLFLOW_TRACKING_URI=http://mlflow:5000
entrypoint: >
/bin/sh -c "
python3 mlflow_tracking.py;
exit 0;
"
networks:
- internal
networks:
internal:
public:
driver: bridge
volumes:
db_new_volume:
minio_new_volume: