-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple CUDA versions #33
Conversation
@fepegar could you run your use case against this branch with If yes, I'm going to merge this and push a release. |
It didn't. It tried the CPU version. This is what I got. $ ltt install "torch<1.3"
Collecting torch==1.2.0+cpu
Downloading https://download.pytorch.org/whl/cpu/torch-1.2.0%2Bcpu-cp36-cp36m-manylinux1_x86_64.whl (103.9 MB)
|████████████████████████████████| 103.9 MB 79 kB/s
Collecting numpy
Using cached numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl (14.8 MB)
Installing collected packages: numpy, torch
Successfully installed numpy-1.19.5 torch-1.2.0+cpu
WARNING: You are using pip version 20.2.4; however, version 21.1.2 is available.
You should consider upgrading via the '/home/fernando/miniconda3/envs/test/bin/python -m pip install --upgrade pip' command.
/bin/sh: 1: cannot open 1.3: No such file
Traceback (most recent call last):
File "/home/fernando/miniconda3/envs/test/bin/ltt", line 8, in <module>
sys.exit(main())
File "/home/fernando/miniconda3/envs/test/lib/python3.6/site-packages/light_the_torch/cli/__init__.py", line 19, in main
cmd.run(pip_install_args)
File "/home/fernando/miniconda3/envs/test/lib/python3.6/site-packages/light_the_torch/cli/commands.py", line 23, in run
self._run(pip_install_args)
File "/home/fernando/miniconda3/envs/test/lib/python3.6/site-packages/light_the_torch/cli/commands.py", line 110, in _run
subprocess.check_call(cmd, shell=True)
File "/home/fernando/miniconda3/envs/test/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'python -m pip install torch<1.3' returned non-zero exit status 2. Then I ran these: $ python -m pip install torch<1.3
zsh: no such file or directory: 1.3
$ python -m pip install "torch<1.3"
Requirement already satisfied: torch<1.3 in ./miniconda3/envs/test/lib/python3.6/site-packages (1.2.0+cpu)
Requirement already satisfied: numpy in ./miniconda3/envs/test/lib/python3.6/site-packages (from torch<1.3) (1.19.5)
WARNING: You are using pip version 20.2.4; however, version 21.1.2 is available.
You should consider upgrading via the '/home/fernando/miniconda3/envs/test/bin/python -m pip install --upgrade pip' command. |
@fepegar Thanks for trying. Indeed the ordering was buggy and it was not tested properly. Should be fixed now. Could you retry? |
Success! $ ltt install "torch<1.3" ✔ 08:46:46
Collecting torch==1.2.0
Downloading https://download.pytorch.org/whl/cu100/torch-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (748.8 MB)
|███████████▏ | 260.2 MB 12.0 MB/s eta 0:00:41^C |
Just to make sure |
Oops, no: $ ltt install torch
Collecting torch==1.9.0+cpu
Downloading https://download.pytorch.org/whl/cpu/torch-1.9.0%2Bcpu-cp36-cp36m-linux_x86_64.whl (175.5 MB)
|█████████████▊ | 75.4 MB 38.6 MB/s eta 0:00:03^C |
Argh. Let me look into that ... |
Looking good. $ ltt install torch
Collecting torch==1.8.1+cu101
Using cached https://download.pytorch.org/whl/cu101/torch-1.8.1%2Bcu101-cp36-cp36m-linux_x86_64.whl (763.6 MB) $ ltt install "torch<1.3"
Collecting torch==1.2.0
Downloading https://download.pytorch.org/whl/cu100/torch-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (748.8 MB) |
What happened was that the version of the package was prioritized over the computation backend. Thus, |
I see. Yes, I think it's better this way. Good job! |
Fixes #30. In #31 support for installing PyTorch for the latest CUDA version the driver supports was added. With this PR
light-the-torch
now supports installing PyTorch with all versions supported by the driver.