1. Install Nvida Driver Software update 2. Install packages sudo apt-get update sudo apt-get upgrade -ysudo apt-get install -y build-essential cmake unzip pkg-config sudo apt-get install -y libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev sudo apt-get install -y libxvidcore-dev libx264-dev sudo apt-get install -y libgtk-3-dev sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran sudo apt-get install -y libhdf5-serial-dev graphviz sudo apt-get install -y python3-dev python3-tk python-imaging-tk sudo apt-get install -y linux-image-generic linux-image-extra-virtual sudo apt-get install -y linux-source linux-headers-generic
3. check
type the following commands in the terminator:
nvidia-smi
4. Install cuda 11.2
wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
sudo sh cuda_11.2.2_460.32.03_linux.run
Don't select 'install driver'!
Now, you can see the following information on your screen:
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-11.2/
Samples: Installed in /home/dd/
Please make sure that
- PATH includes /usr/local/cuda-11.2/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-11.2/lib64, or, add /usr/local/cuda-11.2/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.2/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 460.00 is required for CUDA 11.2 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
sudo <CudaInstaller>.run --silent --driver
Logfile is /var/log/cuda-installer.log
5. install cuDNN
remember to setup a Nvdia Account
Download cuDNN v8.1.0 (released on January 26th, 2021), for CUDA 11.0,11.1, and 11.2 from the link above. Then, unzip the embedded folder.
tar -zvxf cudnn-11.2-linux-x64-v8.1.0.77.tgz
6. edit variable environment
open `~/.bashrc`by run the following.
cd ~ sudo gedit .bashrc
Add the following at the end of `~/.bashrc`. Note: replace xxx with your own path.
export LD_LIBRARY_PATH=xxx/cuda/lib64:$LD_LIBRARY_PATH
Save the file, and run by the following at the terminal.
source .bashrc
7. copy h files to the target folder
cd xxx/cuda/include sudo cp *.h /usr/local/cuda/include/ Note: replace xxx with your own path
8. reset the read and write permissions of the cudnn.h file.
sudo chmod a+r /usr/local/cuda/include/cudnn.h
9. To verify the installation, check:
nvcc -V
More details: