-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (59 loc) · 1.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (59 loc) · 1.51 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
services:
registry:
build:
context: .
dockerfile: Dockerfile.registry
container_name: ml-registry
ports:
- "8000:8000"
environment:
- LOG_LEVEL=INFO
- APP_ENV=production
- DATABASE_URL=sqlite:///./data/registry.db
- MODEL_STORE_PATH=./model_store
- API_KEY=your-api-key-here
volumes:
- registry-data:/app/data
- model-store:/app/model_store
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
serving:
build:
context: .
dockerfile: Dockerfile.serving
container_name: ml-serving
ports:
- "8001:8001"
depends_on:
registry:
condition: service_healthy
gateway:
build:
context: .
dockerfile: Dockerfile.serving
container_name: ml-gateway
ports:
- "8002:8002"
environment:
- LOG_LEVEL=INFO
command: ["uvicorn", "serving.gateway_app:app", "--host", "0.0.0.0", "--port", "8002", "--no-access-log"]
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8002/health')"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
depends_on:
registry:
condition: service_healthy
restart: unless-stopped
volumes:
registry-data:
driver: local
model-store:
driver: local