mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
removed duplicated env and align with other shell scripts
This commit is contained in:
parent
65f6b979c3
commit
64ced408b7
1 changed files with 1 additions and 15 deletions
|
@ -3,13 +3,6 @@
|
|||
# Get project root directory
|
||||
PROJECT_ROOT=$(pwd)
|
||||
|
||||
# Create mps-specific venv directory
|
||||
VENV_DIR="$PROJECT_ROOT/.venv-mps"
|
||||
if [ ! -d "$VENV_DIR" ]; then
|
||||
echo "Creating MPS-specific virtual environment..."
|
||||
python3 -m venv "$VENV_DIR"
|
||||
fi
|
||||
|
||||
# Set other environment variables
|
||||
export USE_GPU=true
|
||||
export USE_ONNX=false
|
||||
|
@ -18,18 +11,11 @@ export MODEL_DIR=src/models
|
|||
export VOICES_DIR=src/voices/v1_0
|
||||
export WEB_PLAYER_PATH=$PROJECT_ROOT/web
|
||||
|
||||
# Set environment variables
|
||||
export USE_GPU=true
|
||||
export USE_ONNX=false
|
||||
export PYTHONPATH=$PROJECT_ROOT:$PROJECT_ROOT/api
|
||||
export MODEL_DIR=src/models
|
||||
export VOICES_DIR=src/voices/v1_0
|
||||
export WEB_PLAYER_PATH=$PROJECT_ROOT/web
|
||||
|
||||
export DEVICE_TYPE=mps
|
||||
# Enable MPS fallback for unsupported operations
|
||||
export PYTORCH_ENABLE_MPS_FALLBACK=1
|
||||
|
||||
# Run FastAPI with GPU extras using uv run
|
||||
uv pip install -e .
|
||||
uv run --no-sync python docker/scripts/download_model.py --output api/src/models/v1_0
|
||||
uv run --no-sync uvicorn api.src.main:app --host 0.0.0.0 --port 8880
|
||||
|
|
Loading…
Add table
Reference in a new issue