mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
fix: Correct Python installation check and download success check logic (#2080)
* fix: python installation check logic (fix #2073) * fix: download success check logic (fix #2074)
This commit is contained in:
parent
6c6d62df59
commit
d01be25bc0
2
run.sh
2
run.sh
@ -14,7 +14,7 @@ else
|
|||||||
requirements_file="requirements.txt"
|
requirements_file="requirements.txt"
|
||||||
|
|
||||||
# Check if Python 3.8 is installed
|
# Check if Python 3.8 is installed
|
||||||
if ! command -v python3.8 >/dev/null 2>&1 || pyenv versions --bare | grep -q "3.8"; then
|
if ! (command -v python3.8 >/dev/null 2>&1 || pyenv versions --bare | grep -q "3.8"); then
|
||||||
echo "Python 3 not found. Attempting to install 3.8..."
|
echo "Python 3 not found. Attempting to install 3.8..."
|
||||||
if [ "$(uname)" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
|
if [ "$(uname)" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
|
||||||
brew install python@3.8
|
brew install python@3.8
|
||||||
|
@ -34,7 +34,7 @@ check_file_pretrained() {
|
|||||||
echo failed. starting download from huggingface.
|
echo failed. starting download from huggingface.
|
||||||
if command -v aria2c > /dev/null 2>&1; then
|
if command -v aria2c > /dev/null 2>&1; then
|
||||||
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$1"/"$2" -d ./assets/"$1" -o "$2"
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$1"/"$2" -d ./assets/"$1" -o "$2"
|
||||||
[ -f "./assets/""$1""/""$2""" ] && echo "download successful." || echo "please try again!" && exit 1
|
[ -f "./assets/""$1""/""$2""" ] && echo "download successful." || (echo "please try again!" && exit 1)
|
||||||
else
|
else
|
||||||
echo "aria2c command not found. Please install aria2c and try again."
|
echo "aria2c command not found. Please install aria2c and try again."
|
||||||
exit 1
|
exit 1
|
||||||
@ -50,7 +50,7 @@ check_file_special() {
|
|||||||
echo failed. starting download from huggingface.
|
echo failed. starting download from huggingface.
|
||||||
if command -v aria2c > /dev/null 2>&1; then
|
if command -v aria2c > /dev/null 2>&1; then
|
||||||
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$2" -d ./assets/"$1" -o "$2"
|
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/"$2" -d ./assets/"$1" -o "$2"
|
||||||
[ -f "./assets/""$1""/""$2""" ] && echo "download successful." || echo "please try again!" && exit 1
|
[ -f "./assets/""$1""/""$2""" ] && echo "download successful." || (echo "please try again!" && exit 1)
|
||||||
else
|
else
|
||||||
echo "aria2c command not found. Please install aria2c and try again."
|
echo "aria2c command not found. Please install aria2c and try again."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user