-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (77 loc) · 2.64 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
version: '3.3'
volumes:
database:
artifact-store:
services:
s3:
image: minio/minio:RELEASE.2020-12-18T03-27-42Z
container_name: s3
restart: always
hostname: s3
volumes:
- artifact-store:/data
ports:
- ${MINIO_PORT}:${MINIO_PORT}
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${MINIO_PORT}/minio/health/live"]
interval: 10s
timeout: 10s
retries: 3
create_bucket:
image: minio/mc:RELEASE.2019-07-17T22-13-42Z
depends_on:
- s3
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET__KEY: ${MINIO_SECRET_KEY}
entrypoint: >
/bin/sh -c '
sleep 5;
/usr/bin/mc config host add s3 http://s3:${MINIO_PORT} ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY} --api S3v4;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/${BUCKET_NAME};
/usr/bin/mc policy download s3/${BUCKET_NAME};
/usr/bin/mc policy set public s3/${BUCKET_NAME};
exit 0;
'
pgdb:
container_name: pgdb
restart: always
build: ./docker-db
image: pgdb
volumes:
- database:/var/lib/postgresql/data
ports:
- 5432:5432
expose:
- '5432'
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
PGDATA: /var/lib/postgresql/data/pgdata
mlflow_server:
restart: always
build: ./docker-mlflow-server
image: mlflow_server
container_name: mlflow_server
ports:
- 5000:5000
expose:
- 5000
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
MLFLOW_S3_ENDPOINT_URL: http://s3:${MINIO_PORT}
AWS_ACCESS_KEY_ID: ${MINIO_ACCESS_KEY}
AWS_SECRET_ACCESS_KEY: ${MINIO_SECRET_KEY}
depends_on:
- s3
- pgdb
command: bash -c
"mlflow server --backend-store-uri postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pgdb:5432/${POSTGRES_DATABASE} --host 0.0.0.0 --default-artifact-root s3://${BUCKET_NAME}/"
# volumes are initiated locally in /var/lib/docker/volumes