I am Charmie

メモとログ

PyTorch 1.0 with CUDA 10.0 and cuDNN 7.5 on Ubuntu 18.04

This post describes how to setup PyTorch 1.0 with CUDA 10.0 and cuDNN 7.5 on Ubuntu 18.04.

Step 0 uninstall CUDA 10.1 related components
# uninstall PyTorch
conda uninstall pytorch torchvision cudatoolkit
# uninstall cuDNN
sudo dpkg -r libcudnn7-doc
sudo dpkg -r libcudnn7-dev
sudo dpkg -r libcudnn7
sudo apt purge cuda

Step 1 install CUDA 10.0
Let's first download this file.
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt update
sudo apt install cuda-10.0

Step 2 install cuDNN 7.5 with CUDA 10.0
The deb files are downloadable from the official site.
sudo dpkg -i libcudnn7_7.5.0.56-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.5.0.56-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.5.0.56-1+cuda10.0_amd64.deb

Step 3 install PyTorch
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch