1 Star 3 Fork 0

rukimoe/Retrieval-based-Voice-Conversion-WebUI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run.sh 1.69 KB
一键复制 编辑 原始数据 按行查看 历史
源文雨 提交于 2023-09-02 13:53 . optimize: no json config writeback
#!/bin/bash
if [[ "$(uname)" == "Darwin" ]]; then
# macOS specific env:
export PYTORCH_ENABLE_MPS_FALLBACK=1
export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
elif [[ "$(uname)" != "Linux" ]]; then
echo "Unsupported operating system."
exit 1
fi
if [ -d ".venv" ]; then
echo "Activate venv..."
source .venv/bin/activate
else
echo "Create venv..."
requirements_file="requirements.txt"
# Check if Python 3.8 is installed
if ! command -v python3 &> /dev/null; then
echo "Python 3 not found. Attempting to install 3.8..."
if [[ "$(uname)" == "Darwin" ]] && command -v brew &> /dev/null; then
brew install python@3.8
elif [[ "$(uname)" == "Linux" ]] && command -v apt-get &> /dev/null; then
sudo apt-get update
sudo apt-get install python3.8
else
echo "Please install Python 3.8 manually."
exit 1
fi
fi
python3 -m venv .venv
source .venv/bin/activate
# Check if required packages are installed and install them if not
if [ -f "${requirements_file}" ]; then
installed_packages=$(python3 -m pip freeze)
while IFS= read -r package; do
[[ "${package}" =~ ^#.* ]] && continue
package_name=$(echo "${package}" | sed 's/[<>=!].*//')
if ! echo "${installed_packages}" | grep -q "${package_name}"; then
echo "${package_name} not found. Attempting to install..."
python3 -m pip install --upgrade "${package}"
fi
done < "${requirements_file}"
else
echo "${requirements_file} not found. Please ensure the requirements file with required packages exists."
exit 1
fi
fi
# Download models
./tools/dlmodels.sh
if [[ $? -ne 0 ]]; then
exit 1
fi
# Run the main script
python3 infer-web.py --pycmd python3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/rukiruki/Retrieval-based-Voice-Conversion-WebUI.git
git@gitee.com:rukiruki/Retrieval-based-Voice-Conversion-WebUI.git
rukiruki
Retrieval-based-Voice-Conversion-WebUI
Retrieval-based-Voice-Conversion-WebUI
main

搜索帮助