-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
107 lines (99 loc) · 3.45 KB
/
docker-compose.yaml
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
99
100
101
102
103
104
105
106
107
version: "3.9"
services:
mlflow:
image: $GITHUB_CONTAINER_REPO
container_name: ${PROJECT_NAME}-mlflow
hostname: mlflow
restart: always
stop_grace_period: 10s
build:
context: .
args:
PYTHON_TAG: $PYTHON_TAG
PYTHON_POETRY_VERSION: $PYTHON_POETRY_VERSION
environment:
MLFLOW_BACKEND_STORE_URI: $MLFLOW_BACKEND_STORE_URI
MLFLOW_S3_ENDPOINT_URL: $MLFLOW_S3_ENDPOINT_URL
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
BENTOML_HOME: $BENTOML_HOME
BENTOML_DO_NOT_TRACK: $BENTOML_DO_NOT_TRACK
BENTOML_CONFIG: $BENTOML_CONFIG
BENTOML_BUCKET: $BENTOML_BUCKET
ports:
- ${MLFLOW_PORT}:5000
- 3001:3000
volumes:
- mlflow-prometheus-data:/prometheus
- ./mlflow_bentoml:/workspace/mlflow_bentoml:rwx
- ./conf:/workspace/conf:rwx
- ./models:/workspace/models:rwx
- ./bentoml_configuration.yaml:/workspace/bentoml_configuration.yaml:rwx
- ./bento:${BENTOML_HOME}
command: >
mlflow server --serve-artifacts --host 0.0.0.0 --port 5000 --backend-store-uri "${MLFLOW_BACKEND_STORE_URI}" --default-artifact-root s3://mlflow/ --expose-prometheus /prometheus
minio:
image: minio/minio:${MINIO_TAG}
container_name: ${PROJECT_NAME}-minio
hostname: minio
restart: always
stop_grace_period: 10s
working_dir: /data
volumes:
- minio-data:/data
ports:
- ${MINIO_PORT}:9000
- ${MINIO_CONSOLE_PORT}:9001
environment:
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
MINIO_ROOT_USER: $MINIO_ROOT_USER
MINIO_ROOT_PASSWORD: $MINIO_ROOT_PASSWORD
MINIO_STORAGE_USE_HTTPS: $MINIO_STORAGE_USE_HTTPS
MINIO_PROMETHEUS_AUTH_TYPE: $MINIO_PROMETHEUS_AUTH_TYPE
command: server --console-address ':9001' --address ':9000' /data
mc:
image: minio/mc:${MINIO_MC_TAG}
container_name: ${PROJECT_NAME}-mc
hostname: mc
environment:
MINIO_PORT: $MINIO_PORT
MINIO_ACCESS_KEY: $MINIO_ACCESS_KEY
MINIO_SECRET_KEY: $MINIO_SECRET_KEY
depends_on:
- minio
entrypoint: >
/bin/sh -c ' sleep 5; /usr/bin/mc config host add s3 http://minio:9000 ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY} --api S3v4;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/mlflow; /usr/bin/mc policy download s3/mlflow;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/bento; /usr/bin/mc policy download s3/bento;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/data; /usr/bin/mc policy download s3/data; exit 0; '
postgres:
image: postgres:${POSTGRES_TAG}
container_name: ${PROJECT_NAME}-postgres
hostname: postgres
restart: always
stop_grace_period: 10s
environment:
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $DB_NAME
POSTGRES_USER: $DB_USER
ports:
- ${DB_PORT}:5432
volumes:
- postgres-data:/var/lib/postgresql/data
adminer:
image: adminer:${ADMINER_TAG}
container_name: ${PROJECT_NAME}-adminer
hostname: adminer
restart: always
stop_grace_period: 10s
ports:
- ${ADMINER_PORT}:8080
networks:
default:
name: $PROJECT_NAME
driver: bridge
volumes:
postgres-data: {}
minio-data: {}
mlflow-prometheus-data: {}