This commit is contained in:
Saifeddine ALOUI 2024-01-04 04:40:11 +01:00
parent e77c97f238
commit de5e73c90f

View File

@ -182,7 +182,15 @@ def reinstall_pytorch_with_cuda():
try: try:
ASCIIColors.info("Installing cuda 12.1.1") # -c nvidia/label/cuda-12.1.1 -c nvidia -c conda-forge ASCIIColors.info("Installing cuda 12.1.1") # -c nvidia/label/cuda-12.1.1 -c nvidia -c conda-forge
result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "cuda-toolkit","-y"]) result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "cuda-toolkit","-y"])
except Exception as ex:
ASCIIColors.error(ex)
try:
ASCIIColors.info("Installing ninja") # -c nvidia/label/cuda-12.1.1 -c nvidia -c conda-forge
result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "ninja", "-y"]) result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "ninja", "-y"])
except Exception as ex:
ASCIIColors.error(ex)
try:
ASCIIColors.info("Installing cuda compiler") # -c nvidia/label/cuda-12.1.1 -c nvidia -c conda-forge
result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "cuda-compiler", "-y"]) result = subprocess.run(["conda", "install", "-c", "nvidia/label/cuda-12.1.1", "-c", "nvidia", "-c", "conda-forge", "cuda-compiler", "-y"])
except Exception as ex: except Exception as ex:
ASCIIColors.error(ex) ASCIIColors.error(ex)