Install CUDA, cuDNN, TensorFlow, PyTorch on RTX 30xx using Ubuntu 20.04 in 2022

preview_player
Показать описание
In this tutorial we will learn How to install CUDA, cuDNN, TensorFlow, PyTorch using Ubuntu 20.04 in 2022

Here are commands to install
first step install gcc
sudo apt update
sudo apt install build-essential
sudo apt-get install manpages-dev
sudo apt install gcc

install cuda

add cuda path
nano ~/.bashrc
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}$
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

install cudnn
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

check installation
nvcc --version

#install pytorch and tensorflow
sudo apt install python3.8-venv
python3 -m venv venv
source venv/bin/activate

check pytorch and tensorflow is picking gpu or not

import tensorflow as tf

import torch
Рекомендации по теме
Комментарии
Автор

Great video, this helped me to install cuda and cudnn on my system. Just one thing I noticed is we need to restart system to get output of nvcc --version command which you forget to mention.

akshayvasav
Автор

What great video. keep up the good work.
PS. in my case, everything done without errors but nvcc --version command was not showing version instead it was suggesting me to install cuda toolkit. Then i realized that i need to source my bashrc file and it worked. Thanks once again

awaisyaqoob
Автор

Thanks man. I'd to use Double Commander, save more time in Lin

DjJageyedolon
Автор

Great man, thank you very much for this detailed video. It helps a lot and solves problems for many

anonymousprovisional
Автор

Thankyou, this was really helpful, an the best way to to install CUDA 😃

tanmaykumar
Автор

Great Video man.... Thanks for your efforts

deerajkumarkanala
Автор

Thank you for the video>
I try to install a P100 driver and I'm not entirely sure about the version I should install for Linux 22.04.3 LTS.
Would you happen to have any suggestions?

drcemdede
Автор

Hello very good tutorial. The cuda driver, why don't you install it? Is it included in the Nvidia Diver? Is Nvidia driver the same as Cuda Driver?

rorroteck
Автор

Greetings. I came to know that PyTorch cuda version is not dependent on cuda version of your system. So you can install any PyTorch version of your choice. Further i noticed that tensorflow give strange warning on my system with TF2.4, if you face that you can install tensorflow2.5 and for that you need to have cuda 11.3 and cudnn v8.2.0.53

talha_anwar
Автор

Dude you saved hours of meaningless work from my life. I wish I can buy you a coffee someday.

atikfaysal
Автор

now there are lot of version of nvidia driver, can I just choose the latest? or there is some references can I get for choosing the version of nvidia driver?

SetoFPV
Автор

Great video. Is there any chance that it will work on Ubuntu in Oracle VM VirtualBox?

yuchengzhu
Автор

couldnt instal


failed to verify gcc version

i checked the log file and it says:


info: gcc version: gcc version 11.2.0 (ubuntu 11.2.0- 19ubuntu1)


Error: Unsuported compiler version: 11.2.0. Use --override to override this check.

any help?
i checked online but theres several version for gcc and not all are supported for this version of cuda nor I know what am i doing...

pedroernias
Автор

how to export cuda variables to use TensorFlow. i installed the cuda+cudnn+TensorFlow while importing TensorFlow error illegal core dump. any solution plz. thanks

habibakbar
Автор

Would it be possible for someone to build this distro with
Ubuntu TensorFlow, PyTorch, CUDA, and cuDNN Preinstalled, and upload the Ubuntu image for others to burn to a usb stick??
I have been mostly been using blender and unreal engine but because my project requires data training models for further research I need to build this.

thegreatawakening
Автор

when I install the CuDNN higher version, Do I have to remove the lower first?

taimai
Автор

Hi, I have rtx 2060. Will this video help me?

timaplorred
Автор

Please install cuda/opencv/python using ubuntu 22.04

eddygonzalez
Автор

HI, i am facing this issue ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: ->


can i get a help?

aniketmech
Автор

Installation failed. See log at /var/log/cuda-installer.log for details.

apreceptorswanhindi