Installation Process:
-
Download and install CUDA toolkit 10.0 - get the runfile if on linux If you have an issue the first time running with an error such as "Unsupported compiler", run using the
--override
switch, for example:sh cuda_10.0.130_410.48_linux.run --override
Do not install the driver
-
Download cuDNN v7.6.2 for CUDA 10.0 -- but do not download the .deb variants if on Linux.
-
Extract the cuDNN tarball anywhere, then CD into it, then use the following command:
sudo cp -r * /usr/local/cuda-10.0/
-
Add the relevant CUDA folders to your PATH via (on Unix / Linux):
export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
export PATH=${CUDA_HOME}/bin:${PATH}
To make these persist, add these to your
~/.bashrc
,~/.zshrc
,~/.bash_profile
, etc. -
Install Tensorflow for GPU (
tensorflow-gpu
) or PyTorch (torch
) and test:
TF:
import tensorflow as tf
sess = tf.Session()
PyTorch:
import torch
# Returns true if CUDA is working
torch.cuda.is_available()