Use all custom wheels.

Intel's stable wheels that were released a day or so prior have a VRAM leak, or some other VRAM usage issue in general.
Also adds CCL, the stable wheels for which seem fine (?)
This commit is contained in:
a-One-Fan 2023-05-01 23:19:10 +03:00
parent bd5e0c1d56
commit 7261ec2b1f

View File

@ -6,7 +6,8 @@ if [[ ! -e /opt/intel/oneapi/setvars.sh ]]; then
echo "You don't have the intel oneAPI base toolkit installed." echo "You don't have the intel oneAPI base toolkit installed."
doguide=1 doguide=1
else else
read -p "Would you like to review the links for resources for setting up oneAPI/your drivers?" yn echo "Would you like to review the links for resources for setting up oneAPI/your drivers?"
read -p "Y/n: " yn
if [[ $yn == [yY] ]]; then if [[ $yn == [yY] ]]; then
doguide=1 doguide=1
fi fi
@ -39,27 +40,33 @@ source ./venv/bin/activate
python3 -m pip install --upgrade pip # just to be safe python3 -m pip install --upgrade pip # just to be safe
# IPEX # IPEX
python -m pip install torch==1.13.0a0+git6c9b55e torchvision==0.14.1a0 intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu echo ""
echo "Currently, Intel does not provide appropriate wheels: no torchaudio wheels whatsoever, and the latest stable IPEX wheels use too much VRAM."
# Non-mandatory torchaudio install echo "Building the current master from source, or acquiring wheels from unofficial sources, is necessary."
pip list | grep torchaudio echo ""
if [[ $? == 1 ]]; then echo "Would you like the setup to install known working, custom built, home grown, corn fed wheels for you, also installing/using megatools?"
echo "torchaudio is not installed. You may install one yourself (venv location is ./venv/bin/activate)" read -p "(No exits setup) Y/n:" yn
read -p "Would you like the setup to install a custom built wheel for you, also installing/using megatools? (No exits setup) Y/N:" yn if [[ $yn == [yY] ]]; then
if [[ $yn == [yY] ]]; then sudo apt install megatools
sudo apt install megatools mkdir temp_wheels
mkdir temp_torchaudio_wheel cd ./temp_wheels
cd ./temp_torchaudio_wheel sudo apt-get install megatools
megadl https://mega.nz/file/jc4SnCgS#_7vProAZGAw1l0vojLk7Reo7UZEUCeeHT0ye12Haow8 megadl https://mega.nz/folder/LBgQSTyS#BPjGq8WEpjoZ-uQF7deqTg
pip install --force-reinstall --no-deps torchaudio-0.13.1+b90d798-cp310-cp310-linux_x86_64.whl python -m pip install requests pillow expecttest hypothesis
cd .. python -m pip install --force-reinstall torch-1.13.0a0+git49444c3-cp310-cp310-linux_x86_64.whl
rm -rf ./temp_torchaudio_wheel python -m pip install --force-reinstall --no-deps torchvision-0.14.1a0+5e8e2f1-cp310-cp310-linux_x86_64.whl
else python -m pip install --force-reinstall --no-deps torchaudio-0.13.1+b90d798-cp310-cp310-linux_x86_64.whl
echo "Exiting..." python -m pip install --force-reinstall intel_extension_for_pytorch-1.13.120+git947ab23-cp310-cp310-linux_x86_64.whl
exit 1 cd ..
fi rm -rf ./temp_wheels
else
echo "Exiting..."
exit 1
fi fi
# Luckily, it seems that Intel's CCL is sufficiently good
python -m pip install oneccl_bind_pt -f https://developer.intel.com/ipex-whl-stable-xpu
# install requirements # install requirements
python3 -m pip install -r ./modules/tortoise-tts/requirements.txt # install TorToiSe requirements python3 -m pip install -r ./modules/tortoise-tts/requirements.txt # install TorToiSe requirements
python3 -m pip install -e ./modules/tortoise-tts/ # install TorToiSe python3 -m pip install -e ./modules/tortoise-tts/ # install TorToiSe