Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
118 lines (112 loc) · 2.59 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
118 lines (112 loc) · 2.59 KB
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
services:
app:
build: .
shm_size: 4gb
ports:
- "${HOST_BACKEND_PORT:-8090}:8000"
volumes:
- .:/app
env_file:
- .env
environment:
- PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
depends_on:
- mlflow
- minio
networks:
- ai-network
deploy:
resources:
limits:
memory: 8g
reservations:
memory: 6g
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "${HOST_FRONTEND_PORT:-5173}:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://app:8000
depends_on:
- app
networks:
- ai-network
mlflow:
build:
context: .
dockerfile: Dockerfile.mlflow
ports:
- "${HOST_MLFLOW_PORT:-5000}:5000"
volumes:
- ./mlruns:/mlruns
- ./logs/mlflow:/mlflow-logs
env_file:
- .env
networks:
- ai-network
command: >
mlflow server
--host 0.0.0.0
--port ${MLFLOW_PORT:-5000}
--default-artifact-root /mlruns
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/2.0/mlflow/experiments/list"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
minio:
image: minio/minio:latest
ports:
- "${HOST_MINIO_PORT:-9000}:9000"
- "${HOST_MINIO_CONSOLE_PORT:-9001}:9001"
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
networks:
- ai-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 3
# shiny-ui:
# build:
# context: .
# dockerfile: Dockerfile.shiny
# ports:
# - "${HOST_SHINY_PORT:-3838}:3838"
# environment:
# - API_URL=http://host.docker.internal:${HOST_BACKEND_PORT:-8090}
# - CLIENT_API_URL=${CLIENT_API_URL:-http://localhost:8090}
# depends_on:
# - app
# networks:
# - ai-network
networks:
ai-network:
driver: bridge
volumes:
mlruns:
models:
datasets:
logs:
minio-data: