File size: 1,192 Bytes
8e6e44b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
version: '3.8'

services:
  helion-osc-api:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: helion-osc-api
    restart: unless-stopped
    ports:
      - "8000:8000"
    volumes:
      - ./models:/app/models
      - ./cache:/app/cache
      - ./outputs:/app/outputs
    environment:
      - CUDA_VISIBLE_DEVICES=0
      - HF_HOME=/app/cache
      - TRANSFORMERS_CACHE=/app/cache
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
    networks:
      - helion-network

  # Optional: Nginx reverse proxy
  nginx:
    image: nginx:alpine
    container_name: helion-nginx
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./ssl:/etc/nginx/ssl:ro
    depends_on:
      - helion-osc-api
    networks:
      - helion-network

networks:
  helion-network:
    driver: bridge

volumes:
  models:
  cache:
  outputs: