-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (97 loc) · 2.3 KB
/
docker-compose.yml
File metadata and controls
109 lines (97 loc) · 2.3 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
# Docker Compose Configuration for Inferno v0.8.0
# Production-grade deployment with resource management and monitoring
version: '3.8'
services:
inferno:
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
image: inferno:0.8.0
container_name: inferno
# Port mapping
ports:
- "8000:8000" # API server
- "9090:9090" # Prometheus metrics (optional)
# Environment variables
environment:
INFERNO_LOG_LEVEL: info
INFERNO_MODELS_DIR: /data/models
INFERNO_CACHE_DIR: /data/cache
INFERNO_CONFIG_DIR: /data/config
# Optional: Add these for distributed deployment
# INFERNO_BIND_ADDRESS: 0.0.0.0
# INFERNO_BIND_PORT: 8000
# Volume mounts for persistence
volumes:
# Models directory
- models:/data/models
- cache:/data/cache
- queue:/data/queue
# Configuration
- ./config:/data/config:ro
# Logs (optional)
- logs:/data/logs
# Resource limits
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '1.0'
memory: 2G
# Restart policy
restart: unless-stopped
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
labels: "service=inferno"
# Labels for monitoring and organization
labels:
- "com.inferno.version=0.8.0"
- "com.inferno.service=api"
- "com.inferno.role=inference"
# Volumes for data persistence
volumes:
models:
driver: local
driver_opts:
type: none
o: bind
device: ./data/models
cache:
driver: local
driver_opts:
type: none
o: bind
device: ./data/cache
queue:
driver: local
driver_opts:
type: none
o: bind
device: ./data/queue
logs:
driver: local
driver_opts:
type: none
o: bind
device: ./data/logs
# Optional: Networks for multi-service deployments
networks:
default:
name: inferno-network
driver: bridge