- OS: Ubuntu 20.04.1 LTS
- CUDA: v11.0
- cuDNN: v8.0.5
- Python: 3.8.8
- Tensorflow: 2.4.0
- cuDF: 0.19.2
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ bash Miniconda3-latest-Linux-x86_64.sh
$ source .bashrc
$ conda update -n base -c defaults conda
$ conda install python=3.8.8
$ conda update --all
$ conda create -n p38tf python=3.8.8
$ conda activate p38tf
-
Download cuDNN
-
Extract the tar package:
$ tar -xvzf cudnn-11.0-linux-x64-v8.0.5.39.tgz
- Install cuDNN:
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include/
$ sudo cp cuda/ih /usr/local/cuda/include/
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h
$ sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
- Add cuDNN to the
PATH
:
$ vi ~/.bash_profile
...
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/include:$LD_LIBRARY_PATH
$ source ~/.bash_profile
- Install Tensorflow GPU:
$ pip install -U tensorflow-gpu==2.4.0
- Make sure GPUs are well recognized (e.g.,
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')...]
):
$ python3
Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.config.list_physical_devices("GPU")
...
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]
- Install RAPIDS:
$ conda install -c rapidsai -c nvidia -c numba -c conda-forge cudf=0.19 python=3.8 cudatoolkit=11.0
- Check it works:
$ python3
Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cudf as cd
>>>