-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
36 lines (31 loc) · 1.06 KB
/
Copy pathdocker-entrypoint.sh
File metadata and controls
36 lines (31 loc) · 1.06 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
#!/bin/bash
set -e
echo "============================================"
echo " StorySync - Starting..."
echo "============================================"
# Copy .env file to backend working directory (if exists)
if [ -f /app/backend/.env ]; then
echo "[✓] .env file found."
else
echo "[!] WARNING: /app/backend/.env file not found!"
echo " Provide the .env file from the environment section in Docker Compose or"
echo " via volume mount."
fi
# NVIDIA GPU check
if command -v nvidia-smi &> /dev/null; then
echo "[✓] NVIDIA GPU detected:"
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader 2>/dev/null || echo " GPU info could not be read"
else
echo "[!] WARNING: NVIDIA GPU not found. Whisper will run in CPU mode (might be slow)."
fi
# Start Nginx in the background
echo "[→] Starting Nginx (port 80)..."
nginx
# Start Uvicorn in the foreground
echo "[→] Starting Uvicorn (port 8005)..."
cd /app/backend
exec uvicorn app.main:app \
--host 0.0.0.0 \
--port 8005 \
--workers 1 \
--timeout-keep-alive 300