This commit is contained in:
Saifeddine ALOUI 2023-09-01 00:00:56 +02:00
parent 755f28dc74
commit 6717f8f447

5
app.py
View File

@ -856,7 +856,10 @@ class LoLLMsWebUI(LoLLMsAPPI):
return jsonify({'status':False, "error": "Couldn't install cuda toolkit. Make sure you are running from conda environment"})
ASCIIColors.green("Cuda toolkit installed successfully")
ASCIIColors.yellow("Removing pytorch")
res = subprocess.check_call(["pip","uninstall","torch", "torchvision", "torchaudio", "-y"])
try:
res = subprocess.check_call(["pip","uninstall","torch", "torchvision", "torchaudio", "-y"])
except :
pass
ASCIIColors.green("PyTorch unstalled successfully")
ASCIIColors.yellow("Installing pytorch with cuda support")
res = subprocess.check_call(["pip","install","--upgrade","torch==2.0.1+cu117", "torchvision", "torchaudio", "--index-url", "https://download.pytorch.org/whl/cu117","no-cache"])