forked from NevilPatel01/RVC-WebUI-MacOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·66 lines (55 loc) · 1.42 KB
/
run.sh
File metadata and controls
executable file
·66 lines (55 loc) · 1.42 KB
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
#!/bin/sh
set -fa
# Check if Python is installed
if ! command -v python; then
echo "Python not found. Please install Python using your package manager or via PyEnv."
exit 1
fi
requirements_file="requirements/main.txt"
venv_path=".venv"
# Parse command line arguments
download_models=false
for arg in "$@"; do
case $arg in
--download-models)
download_models=true
;;
*)
;;
esac
done
if [[ ! -d "${venv_path}" ]]; then
echo "Creating venv..."
python -m venv "${venv_path}"
source "${venv_path}/bin/activate"
# Check if required packages are up-to-date
pip install --upgrade -r "${requirements_file}"
fi
echo "Activating venv..."
source "${venv_path}/bin/activate"
# Download models if requested
if [ "$download_models" = true ]; then
echo ""
echo "Running model downloader..."
python download_models.py
download_exit_code=$?
if [ $download_exit_code -eq 0 ]; then
echo ""
echo "Models are ready!"
elif [ $download_exit_code -eq 2 ]; then
echo ""
echo "Note: Model download completed with warnings."
echo "Some models may not have downloaded correctly."
else
echo ""
echo "Error: Model download failed."
echo "Please check the error messages above and try again."
exit 1
fi
echo ""
read -p "Press Enter to continue and start the application..."
echo ""
fi
# Run the main script
echo "Starting RVC WebUI..."
python web.py --pycmd python