added -y to cude toolkit install

This commit is contained in:
Saifeddine ALOUI 2023-08-31 23:54:05 +02:00
parent d8fb30431b
commit 587b3f0451

2
app.py
View File

@ -850,7 +850,7 @@ class LoLLMsWebUI(LoLLMsAPPI):
def upgrade_to_gpu(self):
ASCIIColors.yellow("Received command to upgrade to GPU")
ASCIIColors.info("Installing cuda toolkit")
res = subprocess.check_call(["conda", "install", "-c", "nvidia/label/cuda-11.7.0", "-c", "nvidia", "-c", "conda-forge", "cuda-toolkit", "ninja", "git", "--force-reinstall"])
res = subprocess.check_call(["conda", "install", "-c", "nvidia/label/cuda-11.7.0", "-c", "nvidia", "-c", "conda-forge", "cuda-toolkit", "ninja", "git", "--force-reinstall", "-y"])
if res!=0:
ASCIIColors.red("Couldn't install cuda toolkit")
return jsonify({'status':False, "error": "Couldn't install cuda toolkit. Make sure you are running from conda environment"})