[mamba] Installing cpuonly PyTorch and torchvision from conda channel should not require cudatoolkit
See original GitHub issue🐛 Describe the bug
When installing CPU-only version of PyTorch 1.10 using the official guidelines from the website for using conda
as package manager, the package cudatoolkit
is also installed. The cudatoolkit
package is very large to download (1 GB) and even larger after getting installed. The large size is concern especially in building Docker images.
Basic reproduction steps:
- Use
conda
for a dry-run install ofcpuonly
pytorch=1.10
andtorchvision
. - Check in the output whether
cudatooklit
would have been installed or not.
The script below saves the dry-run’s output to a file and uses grep
to check if cudatoolkit
was indeed identified as a dependency.
# assuming conda is installed
conda create -n dry python=3.8
conda install -q -n dry \
-c pytorch -c defaults -c conda-forge \
cpuonly pytorch=1.10 torchvision \
--dry-run > dry-run.txt
grep cudatoolkit dry-run.txt
Versions
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Microsoft Windows 10 Enterprise
GCC version: Could not collect
Clang version: 13.0.1
CMake version: version 3.22.2
Libc version: N/A
Python version: 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19042-SP0
Is CUDA available: N/A
CUDA runtime version: 11.2.67
GPU models and configuration: GPU 0: NVIDIA GeForce 940MX
Nvidia driver version: 472.88
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] Could not collect
[conda] Could not collect
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Start Locally - PyTorch
To install PyTorch via Anaconda, and do not have a CUDA-capable or ROCm-capable system or do not require CUDA/ROCm (i.e. GPU support), in...
Read more >New mamba environment force torch CPU and I don't know why
I noticed that it get the pytorch 1.13.0 so i tried mamba install pytorch==1.12.1 torchvision torchaudio -c pytorch -c conda-forge and i worked, ......
Read more >conda/conda - Gitter
this happens when I do conda create -q -n test-environment pytorch cpuonly torchvision python=3.7 -c pytorch-nightly with channel_priority=strict.
Read more >Installing Python Packages & setting up libraries for Data ...
Go ahead and install python packages in this manner, by just replacing conda with mamba. mamba install pytorch torchvision torchaudio cpuonly -c ...
Read more >Installation — pytorch_geometric documentation
Ensure that at least PyTorch 1.12.0 is installed: · Find the CUDA version PyTorch was installed with: python -c "import torch; print(torch. ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, with torchvision
0.12.0
, it works as expected — nocudatoolkit
is installed, and only the cpu versions are installed when asked forcpuonly
. Unfortunately, one does have to update to pytorch1.11.0
, but that does not seem to be a breaking change for me at least. Thanks a lot for your work!This seems to have been fixed in the
0.12.0
release made 8 days ago. All conda packages now have a dependency onpytorch-mutex 1.0
(click the(i)
icon on https://anaconda.org/pytorch/torchvision/files to verify):@motjuste does it work for you now?