-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrvc.sh
75 lines (59 loc) · 2.32 KB
/
rvc.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Exit on error
set -e
# Check if necessary tools are installed
if ! command -v git &> /dev/null
then
echo "git could not be found. Please install git."
exit
fi
if ! command -v curl &> /dev/null
then
echo "curl could not be found. Please install curl."
exit
fi
if ! command -v python3 &> /dev/null
then
echo "python3 could not be found. Please install python3."
exit
fi
# Create virtual environment
echo "Creating virtual environment"
python3 -m venv rvc || { echo "Could not create virtual environment. Exiting script."; exit 1; }
# Activate the virtual environment
echo "Activating virtual environment"
source rvc/bin/activate
# Update package lists for upgrades and new package installations
echo "Updating package lists"
sudo apt-get update
# Install git-lfs
echo "Installing git-lfs"
sudo apt-get install git-lfs
# Clone your GitHub repository
echo "Cloning GitHub repository"
git clone https://github.com/an-internet-user001/RVC.git Retrieval-based-Voice-Conversion-WebUI
# Enter the directory
echo "Navigating to the directory"
cd Retrieval-based-Voice-Conversion-WebUI || { echo "Could not navigate to directory. Exiting script."; exit 1; }
# Clone the Hugging Face repository excluding unnecessary files
echo "Cloning Hugging Face repository"
git clone https://huggingface.co/lj1995/VoiceConversionWebUI.git tempdir
rsync -av --exclude-from='excluded_files.txt' tempdir/ .
# Remove the temporary directory
echo "Removing temporary directory"
rm -rf tempdir
# Install dependencies
echo "Installing dependencies"
pip install torch torchvision torchaudio || { echo "Could not install packages with pip. Exiting script."; exit 1; }
# Install poetry
echo "Installing Poetry"
curl -sSL https://install.python-poetry.org | python3 - || { echo "Could not install Poetry. Exiting script."; exit 1; }
# Use poetry to install dependencies in the pyproject.toml file
echo "Using Poetry to install further dependencies"
poetry install || { echo "Could not install packages with Poetry. Exiting script."; exit 1; }
# Install the dependencies listed in the requirements.txt file
echo "Installing dependencies from requirements.txt"
pip install -r requirements.txt || { echo "Could not install packages from requirements.txt. Exiting script."; exit 1; }
# Launch the application
echo "Launching the application"
python infer-web.py