Kokoro-FastAPI/setup.sh
rvuyyuru2 6d717437c9 Renames service and expands Docker configuration
Updates the service name to 'InstaVoice' and introduces multiple server services to enhance scalability.
Modifies GPU resource allocation to use all available devices and adds an NGINX service for reverse proxy capabilities.

Simplifies the structure for better management of the API and UI services.
2025-01-25 21:55:53 +05:30

31 lines
No EOL
662 B
Bash
Executable file

#!/bin/bash
# Ensure models directory exists
mkdir -p api/src/models
# Function to download a file
download_file() {
local url="$1"
local filename=$(basename "$url")
echo "Downloading $filename..."
curl -L "$url" -o "api/src/models/$filename"
}
# Default PTH model if no arguments provided
DEFAULT_MODELS=(
"https://github.com/remsky/Kokoro-FastAPI/releases/download/v0.1.0/kokoro-v0_19.pth"
)
# Use provided models or default
if [ $# -gt 0 ]; then
MODELS=("$@")
else
MODELS=("${DEFAULT_MODELS[@]}")
fi
# Download all models
for model in "${MODELS[@]}"; do
download_file "$model"
done
echo "PyTorch model download complete!"