Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (49 loc) · 1.45 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (49 loc) · 1.45 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
# ============================================================
# Docker Compose - NVIDIA GPU Supported
# ============================================================
# Usage:
# docker compose up -d --build
#
# Requirements:
# - Docker Engine 24+
# - NVIDIA Container Toolkit (nvidia-docker2)
# - NVIDIA GPU driver must be installed
# ============================================================
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: google-images-to-video
restart: unless-stopped
ports:
- "80:80" # Access via browser at http://localhost
# ── NVIDIA GPU Access ──
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1 # 1 GPU is enough
capabilities: [gpu]
# ── Environment Variables ──
# Method 1: Read from .env file
env_file:
- backend/.env
# Method 2: Define directly (optional, if .env file is missing)
# environment:
# - GEMINI_API_KEY=your_key_here
# - SERPER_API_KEY=your_key_here
# ── Volume: Whisper model cache (prevents re-downloading on every build) ──
volumes:
- whisper-cache:/app/.cache
# Healthcheck
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 30s
timeout: 5s
start_period: 60s
retries: 3
volumes:
whisper-cache:
driver: local