-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-train.yml
125 lines (115 loc) · 3.08 KB
/
docker-compose-train.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '3.3'
# with help from https://github.com/aganse/docker_mlflow_db/blob/master/docker-compose.yaml
# run local mlflow server
services:
# use local s3 AWS based bucket for first tries to store artifacts
# not required if you are using remote AWS bucket
#localstack:
# image: localstack/localstack:latest
# container_name: mlflow_s3
# env_file:
# - ../.env
# environment:
# - EDGE_PORT=4566
# - SERVICES=lambda,s3
# ports:
# - '4566-4583:4566-4583'
# volumes:
# - "${TEMPDIR:-/tmp/localstack}:/tmp/localstack"
# - "/var/run/docker.sock:/var/run/docker.sock"
# networks:
# - backend
#s3:
# image: minio/minio:RELEASE.2021-11-24T23-19-33Z
# restart: unless-stopped
# container_name: mlflow_s3
# 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:
# - frontend
# - backend
# volumes:
# - minio_volume:/data
#db:
# restart: always
# image: postgres:latest
# container_name: mlflow_db
# expose:
# - "5432"
# networks:
# - backend
# environment:
# - MUID=$UID
# - MGID=$GID
# - POSTGRES_DB=${POSTGRES_DATABASE}
# - POSTGRES_USER=${POSTGRES_USER}
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# volumes:
# - db_datapg:/var/lib/postgresql/data
web:
restart: always
build: ./mlflow
image: mlflow_server
container_name: mlflow_server
expose:
- "5000"
networks:
- frontend
- backend
env_file:
- .env
command: mlflow server --backend-store-uri postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DATABASE} --default-artifact-root s3://${MLFLOW_BUCKET_NAME} --host 0.0.0.0 -p 5000
# depends_on:
# - db
# - create_s3_buckets
nginx:
restart: always
build: ./nginx
image: mlflow_nginx
container_name: mlflow_nginx
ports:
- "${TRACKING_SERVER_HOST_PORT}:80"
networks:
- frontend
depends_on:
- web
#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/mlflow;
# exit 0;
# "
# networks:
# - backend
networks:
frontend:
driver: bridge
backend:
driver: bridge
volumes:
db_datapg: {}
minio_volume: {}
# mlflow:
# restart: always
# image: mlflow_server:latest
# container_name: mlflow_server_local
# env_file:
# - ../.env
# environment:
# - MLFLOW_S3_ENDPOINT_URL=s3://${MLFLOW_BUCKET_NAME}
# ports:
# - "5000:5000"
# volumes:
# - '../mlflow_data:/app'
# depends_on:
# - localstack
# command: mlflow server --backend-store-uri sqlite:////app/mlflow.db --default-artifact-root s3://${MLFLOW_BUCKET_NAME} --host 0.0.0.0 -p 5000