Skip to content

Commit

Permalink
Update install_cuda.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees authored Jan 8, 2024
1 parent b12631f commit 838108e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@

# Delete the torch package if it doesn't have the cuda version
if args.force or True: # always do this path now.
subprocess.run(["pip", "uninstall", "-y", "torch", "torchtext", "torchdata", "torchaudio", "torchvision", "torch-directml"], check=True)
uninstall = [
"torch",
"torchtext",
"torchdata",
"torchaudio",
"torchvision",
"torch-directm"
]
for package in uninstall:
subprocess.run(["pip", "uninstall", "-y", package], check=True)
subprocess.run(["pip", "cache", "purge"], check=True)
else:
if TENSOR_CUDA_VERSION not in pip_list_stdout:
Expand Down

0 comments on commit 838108e

Please sign in to comment.