-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
109 lines (101 loc) · 3.22 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
108
109
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
environment:
MLFLOW_BACKEND_STORE_URI: $MLFLOW_BACKEND_STORE_URI
MLFLOW_S3_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: $DB_USER
AWS_SECRET_ACCESS_KEY: $DB_PASSWORD
BENTOML_HOME: $BENTOML_HOME
BENTOML_DO_NOT_TRACK: "True"
BENTOML_CONFIG: $BENTOML_CONFIG
BENTOML_BUCKET: s3://bento
ports:
- 5000:5000
- 3001:3000
volumes:
- mlflow-prometheus-data:/prometheus
- ./pymc_mlflow:/workspace/pymc_mlflow:rwx
- ./conf:/workspace/conf:rw
- ./models:/workspace/models:rw
- ./bentoml_configuration.yaml:${BENTOML_CONFIG}:rw
- ./bento:${BENTOML_HOME}
- ./outdir:/workspace/outdir
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:
- 9000:9000
- 9001:9001
environment:
MINIO_ACCESS_KEY: $DB_USER
MINIO_SECRET_KEY: $DB_PASSWORD
MINIO_ROOT_USER: $DB_USER
MINIO_ROOT_PASSWORD: $DB_PASSWORD
MINIO_STORAGE_USE_HTTPS: "False"
MINIO_PROMETHEUS_AUTH_TYPE: public
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: 9000
MINIO_ACCESS_KEY: $DB_USER
MINIO_SECRET_KEY: $DB_PASSWORD
depends_on:
- minio
entrypoint: >
/bin/sh -c ' sleep 5; /usr/bin/mc config host add s3 http://minio:9000 ${DB_USER} ${DB_PASSWORD} --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:
- 5432: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:
- 8080:8080
networks:
default:
name: $PROJECT_NAME
driver: bridge
volumes:
postgres-data: {}
minio-data: {}
mlflow-prometheus-data: {}