Files
tts/server/run.sh
dsyoon 373299e0cb Update run scripts for executable env
Make run scripts executable and use the specified Python path for uvicorn.
2026-01-30 14:48:31 +09:00

16 lines
456 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd /home/dsyoon/workspace/tts
PORT="${PORT:-8019}"
if lsof -ti tcp:"${PORT}" >/dev/null 2>&1; then
echo "Stopping existing server on port ${PORT}..."
lsof -ti tcp:"${PORT}" | xargs -r kill -9
sleep 1
fi
PORT="${PORT}" nohup /home/dsyoon/workspace/miniconda3/envs/ncue/bin/python -m uvicorn server.main:app --host 0.0.0.0 --port "${PORT}" > server.log 2>&1 &
echo "Server started (PID: $!). Logs: server.log"