5 Steps to Install PyTorch 2.0 and Tensorflow 2.12 on Ubuntu 22.04 with CUDA and cuDNN

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I am going to show you that how I we can install Pi torch and tensorflow in five simple steps in Ubuntu 22.04 first I am going to show you that I have just installed the latest version of Ubuntu and you can see my Ubuntu version is 22.04 previously I am using 20 20.04 I believe and I have created our tutorial on that also that was a very detailed tutorial but this tutorial will be a simplified and short tutorial and I'm not going to show you by executing this tab but I will just tell you the command which I also right hit here and you cannot find all these in the description of this video the first thing is you have to update your Ubuntu after the install it installation of the latest Ubuntu version you can use sudo app update then you have to install the essence build essential package Man pages Dev and GCC these four are the requirement to install the then you have to basically go to the qdot toolkit you can see I am going to install Cuda toolkit 11.8 the reason to install Cuda toolkit 11.8 is that I want to install the latest of tensorflow version which is 2.12 and you can see the qdnan version requirement is 8.6 Q double version is 11.8 if you have installed the latest then your python version will be python 3.10 which you can verify by typing Python 3 Dash version you can see it is 3.10.6 so we have Ubuntu 22.04.2 and Python 3.10.6 and now we have to install the queue die 11.8 and qdn in 8.6 you have to just simply search in Google that could decoder toolkit 11.8 and you have to now select the following option Linux because I'm using Ubuntu x8664 and then I have to choose Ubuntu here and version should be 22.04 and installer type should be run file locker then you can see the installation guide under this section you have to Simply use wget to download this file and then you can use sudo sh to run the install the file when you run this command you will see a screen like this you have to uncheck the driver installation you have to uncheck the Cuda demo suit to the documentation and kernel objects the only thing I want to install this Cuda toolkit 11.8 so this is checked one more thing you have your driver installed before running this you can verify your driver by typing nvidia-smi you can see I have 470 version installed you can install if you do not have installed this by going to additional drivers as you can see a list of driver you can simply choose the 471 from here um basically you have to choose this known server one this is the 470 server and I would prefer to install this one which is 470 known server like using video driver meta packages from Nvidia driver for sample I am going to install this one you can install maybe 515 520 or 525 but I'm happy with this 471 so once you select this just click on apply changes and it will be installed on your system after the installation of the driver and you have to install the Cuda toolkit The Next Step you have to do is to open The Bash RC file which you can do by copying this line and paste it here if you go to the bottom of this file you can see there are two line the X showing the export in your system when you open the batch RC file you won't see this line you have to just copy these two lines from here and you have to just put at the bottom of the bash RC file and just save the file now our Cuda installation process is completed if you are thinking what is this line this is the same line which we can see here now the next step is to download the qdn version which is 8.6 you can go to the qdn archive or qdn download when you are executed in download page and you select the term of software license agreement you have to go to Archive qdn release because the latest is 8.9 and we are going to install the 8.6 there are two version for 8.6 one is for 11.x and one is for Cuda 10.2 we are going to install for the Cuda 11.x now you have to choose the local installer for Linux x8664 tar file instead of this Ubuntu Deb file you have to choose this star file click on this file and it will start downloading I have already downloaded that so I'm not going to install that so once it has been downloaded you have to enter this just simply copy this file copy this command and run in your terminal it will be entered next you have to copy the content of the folder created to the user local Cuda 11.8 in kilo directory and 11.8 live 64 directly once you have copied this files then you have to change the permission which you can use by which you can do by using sudo CH mode now your Cuda and qdn package has been installed and you have to install the python three point then virtual environment you can just use sudo app to install python 3.10 EnV this will install the virtual environment and now you can create virtual environment which you can create by using Python 3 Dash and virtual environment and then the name of the virtual environment and then you can activate the virtual environment update your pip setup and these packages and next you have to install the tensorflow 2.12.0 and after that you can simply check the version of the tensorflow simply go to the terminal type python before that if your watch environment is not activated just activate the virtual environment then you have to type python and import tensorflow SDF and then you can just copy this line which is tf.config.list physical devices it will list all the gpus which your system has and you can see my system has one GPU and it's showing the other one after that you have to install the fire torch one thing you should now that the power torch package come with its own Cuda and qdna file you don't need to worry about the quota and qdn files of the part torch you can install I would recommend to install the latest version which is this table 2 version But first you have to select this table the Linux pip Python and just simply install this if you have to install some older version then you can install the previous version do not worry about the Cuda and qdna package Partners will handle all of this for you you can simply choose any of the package for example if I want to install the then I can simply copy this line and run in my terminal there's no need that do not worry if this Cuda version different than the ones you have just installed this is simply you can install pie torch and tensorflow this is the end of this tutorial I hope you like this tutorial thank you everyone and if you are a bit confused by the way you can simply watch the previous tutorial with the link of which you can find in the description thank you once again
Info
Channel: Talha Anwar
Views: 4,959
Rating: undefined out of 5
Keywords: deeplearning, machine learning, pytorch, pytorch lightning, tutorial, tensorflow, ubuntu, CUDA, cuDNN
Id: 4p4b9qT5S6w
Channel Id: undefined
Length: 9min 8sec (548 seconds)
Published: Sun Apr 23 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.