when I issue the command, as listed on the website:
conda install pytorch-cpu torchvision -c pytorch
I would expect the package pytorch and all the cuda dependencies to NOT be installed. However, they are being installed, pytorchcuda and all the other larger packages:
@jpeg729 actually, this is not correct. torchvision depends on pytorch. pytorch-cpu doesn’t depend on pytorch.
The conda recpie is here:
Also, you can see this bellow, where I first install pytorch-cpu and then torchvision using the -no-deps flag to ignore dependencies. As you can see, the cuda packages are not installed. This is the current workaround we us to avoid having to install the cuda packages on every run of our continuous integration system.
I took the liberty to propose a fix via pull-request:
esc@omnitech /tmp % conda install -c pytorch pytorch-cpu
Solving environment: done
## Package Plan ##
environment location: /tmp/miniconda
added / updated specs:
- pytorch-cpu
The following packages will be downloaded:
package | build
---------------------------|-----------------
mkl-2018.0.1 | h19d6760_4 184.7 MB defaults
intel-openmp-2018.0.0 | hc7b2577_8 618 KB defaults
pytorch-cpu-0.3.1 | py36_cpu_2 36.6 MB pytorch
libgfortran-ng-7.2.0 | hdf63c60_3 1.2 MB defaults
numpy-1.14.2 | py36hdbf6ddf_0 4.0 MB defaults
------------------------------------------------------------
Total: 227.1 MB
The following NEW packages will be INSTALLED:
intel-openmp: 2018.0.0-hc7b2577_8 defaults
libgfortran-ng: 7.2.0-hdf63c60_3 defaults
mkl: 2018.0.1-h19d6760_4 defaults
numpy: 1.14.2-py36hdbf6ddf_0 defaults
pytorch-cpu: 0.3.1-py36_cpu_2 pytorch
Downloading and Extracting Packages
mkl 2018.0.1: ###################################################################################################################################################################################################### | 100%
intel-openmp 2018.0.0: ############################################################################################################################################################################################# | 100%
pytorch-cpu 0.3.1: ################################################################################################################################################################################################# | 100%
libgfortran-ng 7.2.0: ############################################################################################################################################################################################## | 100%
numpy 1.14.2: ###################################################################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
conda install -c pytorch pytorch-cpu 96,83s user 5,34s system 58% cpu 2:55,52 total
esc@omnitech /tmp % conda install --no-deps -c pytorch torchvision
Solving environment: done
## Package Plan ##
environment location: /tmp/miniconda
added / updated specs:
- torchvision
The following packages will be downloaded:
package | build
---------------------------|-----------------
torchvision-0.2.0 | py36h17b6947_1 102 KB pytorch
The following NEW packages will be INSTALLED:
torchvision: 0.2.0-py36h17b6947_1 pytorch
Downloading and Extracting Packages
torchvision 0.2.0: ################################################################################################################################################################################################# | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done