-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (65 loc) · 1.86 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
version: "3.7"
services:
minio:
restart: always
image: minio/minio
expose:
- "9002"
ports:
- "9002:9000"
- "9001:9001"
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=user
- MINIO_ROOT_PASSWORD=password
healthcheck:
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1
interval: 1s
timeout: 10s
retries: 5
volumes:
- ./minio:/data
minio-create-bucket:
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
bash -c "
mc alias set minio http://minio:9000 user password &&
if ! mc ls minio | grep --quiet mlflow; then
mc mb minio/mlflow
else
echo 'mlflow bucket already exists'
fi
"
postgres:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "9003:5432"
volumes:
- ./postgres:/var/lib/postgresql/data
mlflow:
image: ghcr.io/mlflow/mlflow
depends_on:
- postgres
- minio-create-bucket
ports:
- "5500:5500"
environment:
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
- AWS_ACCESS_KEY_ID=user
- AWS_SECRET_ACCESS_KEY=password
- MLFLOW_HTTP_REQUEST_TIMEOUT=900
entrypoint: >
bash -c "
apt-get -y update && \
apt-get -y install python3-dev default-libmysqlclient-dev build-essential pkg-config && \
pip install --upgrade pip && \
pip install boto3 psycopg2-binary
mlflow server --serve-artifacts --backend-store-uri 'postgresql+psycopg2://postgres:postgres@postgres/postgres' --artifacts-destination s3://mlflow/ --default-artifact-root mlflow-artifacts:/mlflow --gunicorn-opts '--log-level debug --timeout 900' --port 5500 --host 0.0.0.0
"