Pytorch for cuda 10.2

Dear ptrblck,

it works !

I follow your instruction.

uninstall pytorch

$ conda remove pytorch
## Package Plan ##

  environment location: /home/silverant/anaconda3/envs/rl_gym_book

  removed specs:
    - pytorch


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mkl-2018.0.3               |                1       126.9 MB
    mkl_fft-1.0.6              |   py35h7dd41cf_0         134 KB
    mkl_random-1.0.1           |   py35h4414c95_1         313 KB
    numpy-1.15.2               |   py35h1d66e8a_0          46 KB
    numpy-base-1.15.2          |   py35h81de0dd_0         3.4 MB
    tbb-2019.8                 |       hfd86e86_0         1.1 MB
    tbb4py-2018.0.5            |   py35h6bb024c_0         201 KB
    ------------------------------------------------------------
                                           Total:       132.1 MB

The following NEW packages will be INSTALLED:

  mkl_fft            pkgs/main/linux-64::mkl_fft-1.0.6-py35h7dd41cf_0
  mkl_random         pkgs/main/linux-64::mkl_random-1.0.1-py35h4414c95_1
  numpy-base         pkgs/main/linux-64::numpy-base-1.15.2-py35h81de0dd_0
  tbb                pkgs/main/linux-64::tbb-2019.8-hfd86e86_0
  tbb4py             pkgs/main/linux-64::tbb4py-2018.0.5-py35h6bb024c_0

The following packages will be REMOVED:

  cudatoolkit-10.1.243-h6bb024c_0
  libtiff-4.1.0-h2733197_0
  olefile-0.46-py35_0
  pillow-5.2.0-py35heded4f4_0
  pytorch-1.3.1-py3.5_cuda10.1.243_cudnn7.6.3_0
  torchvision-0.4.2-py35_cu101
  zstd-1.3.7-h0b5b093_0

The following packages will be UPDATED:

  numpy                               1.14.2-py35hdbf6ddf_0 --> 1.15.2-py35h1d66e8a_0

The following packages will be DOWNGRADED:

  mkl                                            2019.4-243 --> 2018.0.3-1


Proceed ([y]/n)? y

then install pytorch again

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
## Package Plan ##

  environment location: /home/silverant/anaconda3/envs/rl_gym_book

  added / updated specs:
    - cudatoolkit=10.1
    - pytorch
    - torchvision


The following NEW packages will be INSTALLED:

  cudatoolkit        pkgs/main/linux-64::cudatoolkit-10.1.243-h6bb024c_0
  libtiff            pkgs/main/linux-64::libtiff-4.1.0-h2733197_0
  olefile            pkgs/main/linux-64::olefile-0.46-py35_0
  pillow             pkgs/main/linux-64::pillow-5.2.0-py35heded4f4_0
  pytorch            pytorch/linux-64::pytorch-1.3.1-py3.5_cuda10.1.243_cudnn7.6.3_0
  torchvision        pytorch/linux-64::torchvision-0.4.2-py35_cu101
  zstd               pkgs/main/linux-64::zstd-1.3.7-h0b5b093_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

and after that, the cuda.is_available() return True

$ python -c 'import torch;print(torch.cuda.is_available())'
True

Thank you very much sir.

best regards,

5 Likes