-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 2.42 KB
/
docker-compose.yml
File metadata and controls
93 lines (87 loc) · 2.42 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
# Docker Compose — Base Configuration
# AI Product Photo Detector
#
# This file defines the service structure shared by dev and prod.
# Use with an override file:
# Dev: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# Prod: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
services:
# --- Inference API ---
api:
build:
context: .
dockerfile: docker/Dockerfile
container_name: ai-detector-api
ports:
- "${API_PORT:-8080}:8080"
environment:
- PORT=8080
- AIDETECT_MODEL_PATH=/app/models/checkpoints/best_model.pt
networks:
- detector-network
# --- Streamlit UI ---
ui:
build:
context: .
dockerfile: docker/ui.Dockerfile
container_name: ai-detector-ui
ports:
- "${UI_PORT:-8501}:8501"
environment:
- API_URL=http://api:8080
depends_on:
api:
condition: service_healthy
networks:
- detector-network
# --- MLflow Tracking Server ---
mlflow:
image: python:3.11-slim
container_name: ai-detector-mlflow
command: >
bash -c "pip install --no-cache-dir mlflow==2.16.0 &&
mlflow server
--host 0.0.0.0
--port 5000
--backend-store-uri sqlite:///mlflow/mlflow.db
--default-artifact-root /mlflow/artifacts"
ports:
- "${MLFLOW_PORT:-5000}:5000"
networks:
- detector-network
# --- Prometheus ---
prometheus:
image: prom/prometheus:v2.53.0
container_name: ai-detector-prometheus
ports:
- "${PROMETHEUS_PORT:-9090}:9090"
volumes:
- ./configs/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./configs/prometheus/alerting-rules.yml:/etc/prometheus/alerting-rules.yml:ro
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=15d"
- "--web.enable-lifecycle"
depends_on:
api:
condition: service_healthy
networks:
- detector-network
# --- Grafana ---
grafana:
image: grafana/grafana:11.1.0
container_name: ai-detector-grafana
ports:
- "${GRAFANA_PORT:-3000}:3000"
environment:
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./configs/grafana/provisioning:/etc/grafana/provisioning:ro
- ./configs/grafana/dashboards:/var/lib/grafana/dashboards:ro
depends_on:
- prometheus
networks:
- detector-network
networks:
detector-network:
driver: bridge