File size: 327 Bytes
0a10d51
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
set -euo pipefail

/home/user/app/scripts/run_backend.sh &
backend_pid=$!

cleanup() {
  kill "${backend_pid}" 2>/dev/null || true
}
trap cleanup EXIT INT TERM

# Expose the UI immediately while the model initializes in the background.
exec uvicorn app:app --host 0.0.0.0 --port "${PORT:-7860}" --workers 1