-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
92 lines (69 loc) · 2.29 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
services:
# creating the development environment service (which is running the jupyter notebook)
dev:
image: e2e-dev:latest
build:
context: .
dockerfile: ./notebooks/Dockerfile.dev
depends_on:
- mlflow
command: ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]
# exposing the port that will be used by Jupyter Notebook
ports:
- "8888:8888"
# setting external volumes
volumes:
- ./src/config/:/e2e-project/src/config/
- ./models:/e2e-project/models/
- ./data:/e2e-project/data/
mlflow:
image: e2e-dev:latest
build:
context: ./notebooks/
dockerfile: ./Dockerfile.dev
command: ["mlflow", "server", "-h", "0.0.0.0", "-p", "5000"]
# exposing the port that will be used by MLFlow
ports:
- "5000:5000"
# setting external volumes
volumes:
- ./src/config/:/e2e-project/src/config/
- ./models:/e2e-project/models/
- ./data:/e2e-project/data/
# creating the production environment (which will run FastAPI)
prod:
image: e2e-prod:latest
build:
context: .
dockerfile: ./Dockerfile
working_dir: /e2e-mlops-project/src/
depends_on:
- mlflow
command: ["fastapi", "run", "api/main.py", "--host", "0.0.0.0", "--port", "8000"]
# exposing the port that will be used by FastAPI
ports:
- "8000:8000"
# setting external volumes
volumes:
- ./models:/e2e-mlops-project/models/
- ./data:/e2e-mlops-project/data/
- ./reports:/e2e-mlops-project/reports/
- ./notebooks/VERSION:/e2e-mlops-project/notebooks/VERSION
# creating the production environment (which will run FastAPI)
test:
image: e2e-prod:latest
build:
context: .
dockerfile: ./Dockerfile
working_dir: /e2e-mlops-project/src/
depends_on:
- mlflow
- prod
command: ["pytest", "--cov-report", "html:../reports/cov_html", "--cov=.", "../tests/", "--disable-warnings"]
# setting external volumes
volumes:
- ./models:/e2e-mlops-project/models/
- ./data:/e2e-mlops-project/data/
- ./tests:/e2e-mlops-project/tests/
- ./reports:/e2e-mlops-project/reports/
- ./notebooks/VERSION:/e2e-mlops-project/notebooks/VERSION