Run server in tts conda env

Activate the tts conda environment and set library path before starting uvicorn.
This commit is contained in:
dsyoon
2026-01-30 20:08:53 +09:00
parent c40fa33e7b
commit 1e8ff342c7

View File

@@ -3,6 +3,10 @@ set -euo pipefail
cd /home/dsyoon/workspace/tts cd /home/dsyoon/workspace/tts
CONDA_BASE="/home/dsyoon/workspace/miniconda3"
source "${CONDA_BASE}/bin/activate" tts
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH:-}"
PORT="${PORT:-8019}" PORT="${PORT:-8019}"
if lsof -ti tcp:"${PORT}" >/dev/null 2>&1; then if lsof -ti tcp:"${PORT}" >/dev/null 2>&1; then
@@ -11,5 +15,5 @@ if lsof -ti tcp:"${PORT}" >/dev/null 2>&1; then
sleep 1 sleep 1
fi 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 & PORT="${PORT}" nohup python -m uvicorn server.main:app --host 0.0.0.0 --port "${PORT}" > server.log 2>&1 &
echo "Server started (PID: $!). Logs: server.log" echo "Server started (PID: $!). Logs: server.log"