-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (87 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
101 lines (87 loc) · 2.86 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
services:
glurpc:
image: glucosedao/glurpc:latest
#image: ghcr.io/glucosedao/glurpc:latest
container_name: glurpc-service
restart: unless-stopped
ports:
# gRPC on localhost only
- "127.0.0.1:7003:7003"
# REST on all interfaces
- "8000:8000"
volumes:
# Cache persistence using named volume
- glurpc-cache:/app/cache_storage:z
# Logs to host directory for easy access
- ./logs:/app/logs:z
# API keys file (create api-keys.txt with one key per line)
- ./api_keys_list:/app/api_keys_list:ro,Z
# SNET daemon build directory (auto-populated on first run)
- ./snetd_daemon:/app/snetd_daemon:z
environment:
# --- Cache Configuration ---
MAX_CACHE_SIZE: 128
ENABLE_CACHE_PERSISTENCE: "True"
# --- Data Processing Configuration ---
# Note: These use model defaults if not set (MINIMUM_DURATION_MINUTES=540, MAXIMUM_WANTED_DURATION=1080)
# Uncomment to override:
MINIMUM_DURATION_MINUTES: 540
MAXIMUM_WANTED_DURATION: 1080
# --- API Configuration ---
ENABLE_API_KEYS: "True"
# --- Model and Inference Configuration ---
NUM_COPIES_PER_DEVICE: 2
BACKGROUND_WORKERS_COUNT: 4
BATCH_SIZE: 32
NUM_SAMPLES: 10
# --- Timeout Configuration ---
INFERENCE_TIMEOUT_GPU: 600.0
INFERENCE_TIMEOUT_CPU: 7200.0
# --- Queue Configuration ---
MAX_INFERENCE_QUEUE_SIZE: 64
MAX_CALC_QUEUE_SIZE: 8192
# --- Logging Configuration ---
LOG_LEVEL_ROOT: INFO
LOG_LEVEL_LOGIC: INFO
LOG_LEVEL_ENGINE: INFO
LOG_LEVEL_CORE: INFO
LOG_LEVEL_APP: INFO
LOG_LEVEL_STATE: INFO
LOG_LEVEL_CACHE: INFO
LOG_LEVEL_LOCKS: ERROR
GLURPC_LOGS_DIR: /app/logs
GLURPC_VERBOSE: "False"
# --- Application Paths Configuration ---
GLURPC_APP_ROOT: /app
GLURPC_CACHE_DIR: /app/cache_storage
GLURPC_API_KEYS_FILE: /app/api_keys_list
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Override command for different modes:
# Default (combined service, no daemon - daemon runs in separate container):
command: ["glurpc-combined", "--combined"]
#
# REST only:
# command: ["glurpc-combined", "--rest"]
#
# gRPC only:
# command: ["glurpc-combined", "--grpc"]
# Resource limits (optional, adjust based on your needs)
# deploy:
# resources:
# limits:
# cpus: '4.0'
# memory: 8G
# reservations:
# cpus: '2.0'
# memory: 4G
volumes:
glurpc-cache:
name: glurpc-cache
glurpc-etcd:
name: glurpc-etcd
driver: local