-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (70 loc) · 1.98 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (70 loc) · 1.98 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
services:
backend:
build:
context: .
dockerfile: Dockerfile
image: depthlenspro-backend:latest
env_file:
- path: .env
required: false
environment:
HOST: ${HOST:-0.0.0.0}
PORT: ${PORT:-8765}
LOG_LEVEL: ${LOG_LEVEL:-info}
DEBUG: ${DEBUG:-false}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_DB: ${REDIS_DB:-0}
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
REDIS_SOCKET_TIMEOUT_SECONDS: ${REDIS_SOCKET_TIMEOUT_SECONDS:-1.5}
REDIS_MAX_CONNECTIONS: ${REDIS_MAX_CONNECTIONS:-20}
CACHE_TTL_SECONDS: ${CACHE_TTL_SECONDS:-3600}
WEB_CONCURRENCY: ${WEB_CONCURRENCY:-1}
INFERENCE_MAX_CONCURRENCY: ${INFERENCE_MAX_CONCURRENCY:-2}
ORT_INTRA_OP_NUM_THREADS: ${ORT_INTRA_OP_NUM_THREADS:-2}
ORT_INTER_OP_NUM_THREADS: ${ORT_INTER_OP_NUM_THREADS:-1}
NVIDIA_VISIBLE_DEVICES: ${NVIDIA_VISIBLE_DEVICES:-all}
NVIDIA_DRIVER_CAPABILITIES: ${NVIDIA_DRIVER_CAPABILITIES:-compute,utility}
ports:
- "8765:8765"
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
init: true
cpus: "4.0"
mem_limit: 8g
shm_size: "8gb"
pids_limit: 512
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8765/live', timeout=3).read()\""]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
deploy:
resources:
limits:
cpus: "4.0"
memory: 8G
reservations:
memory: 1G
devices:
- driver: nvidia
count: all
capabilities: [gpu]
redis:
image: redis:alpine
command: ["redis-server", "--appendonly", "yes"]
expose:
- "6379"
volumes:
- redis-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
volumes:
redis-data: