Trouter-Library commited on
Commit
8e6e44b
·
verified ·
1 Parent(s): 738fe17

Create docker-compose.yml

Browse files
Files changed (1) hide show
  1. docker-compose.yml +59 -0
docker-compose.yml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ helion-osc-api:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ container_name: helion-osc-api
9
+ restart: unless-stopped
10
+ ports:
11
+ - "8000:8000"
12
+ volumes:
13
+ - ./models:/app/models
14
+ - ./cache:/app/cache
15
+ - ./outputs:/app/outputs
16
+ environment:
17
+ - CUDA_VISIBLE_DEVICES=0
18
+ - HF_HOME=/app/cache
19
+ - TRANSFORMERS_CACHE=/app/cache
20
+ deploy:
21
+ resources:
22
+ reservations:
23
+ devices:
24
+ - driver: nvidia
25
+ count: 1
26
+ capabilities: [gpu]
27
+ healthcheck:
28
+ test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
29
+ interval: 30s
30
+ timeout: 10s
31
+ retries: 3
32
+ start_period: 60s
33
+ networks:
34
+ - helion-network
35
+
36
+ # Optional: Nginx reverse proxy
37
+ nginx:
38
+ image: nginx:alpine
39
+ container_name: helion-nginx
40
+ restart: unless-stopped
41
+ ports:
42
+ - "80:80"
43
+ - "443:443"
44
+ volumes:
45
+ - ./nginx.conf:/etc/nginx/nginx.conf:ro
46
+ - ./ssl:/etc/nginx/ssl:ro
47
+ depends_on:
48
+ - helion-osc-api
49
+ networks:
50
+ - helion-network
51
+
52
+ networks:
53
+ helion-network:
54
+ driver: bridge
55
+
56
+ volumes:
57
+ models:
58
+ cache:
59
+ outputs: