-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathstart.sh
35 lines (26 loc) · 1 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Check if Python exists
if ! command -v python &> /dev/null; then
echo "Python is not installed. Please install Python before running this script."
exit 1
fi
# Create virtual environment (.venv)
python -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Check for Nvidia GPU using nvidia-smi
if nvidia-smi &> /dev/null; then
# Install GPU version
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
else
# Install CPU version
pip install torch torchvision torchaudio -f https://download.pytorch.org/whl/cpu
fi
# Install dependencies from requirements.txt
pip install -r requirements.txt
# Download requirement voice model
wget https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt?download=true -O assets/hubert/hubert_base.pt
wget https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt?download=true -O assets/rvmpe/rmvpe.pt
# Run the inference app
python app.py
echo "Finished!"