How to Install TensorFlow GPU on Linux
Skills:
LLM Foundations60%
Key Takeaways
The video demonstrates how to install TensorFlow 2.0 GPU version on a Linux machine, specifically on Ubuntu, by following the steps listed on the TensorFlow website, including installing CUDA, Nvidia drivers, and TensorFlow 2.0 using pip3.
Full Transcript
hey guys so in today's video I'm gonna be showing you how to install tensorflow 2.0 GPU version on Anna bunt 2 / Linux machine now this should work for any version of Linux or any Linux operating system although the one I am gonna be showing you on is a bun to 18 point 0.4 now you may notice that I'm actually on a Windows machine right now and that this is actually just in a bunch of terminal that's open now I'm actually just SS aged into a server that I have that contains 2 1080 graphics card so GTX 1080s and that's how I'm gonna be showing you how to do this now quickly if you don't understand the difference between the CPU and the GPU version the CPU version is essentially just way slower and you would only really use the CPU version if you don't have a graphics card in your computer that is capable of running tensorflow 2.0 GPU so quickly before we go forward and you guys get frustrated with not being able to install this make sure that you have a graphics card that actually works for this programmer for this module that means you have to have a graphics card that is a gtx 1050 TI or higher those are the ones that are listed on tensorflow website as compatible with tensorflow 2.0 GPU if you want to have a quick thing without having to go to the website to see if yours works even as 4 gigs of video RAM and is a GTX generation card or higher it most likely works with tensorflow 2.0 now I don't know about all the different cards but you have any questions leave them below I'll try to answer that for you but any 1060 1070 1080 or r-tx cards they have CUDA cores on them will work for this essentially you just need a CUDA enable GPU so you can check if yours meets that requirement before moving forward now to do this I'm just gonna be following the steps listed on the tensorflow website now you may run into some issues while doing this but for Ubuntu this is pretty straightforward and I'm essentially just gonna be copying these commands and pasting them in my terminal now if you'd like to just try to do this without following along with video go ahead but I will be kind of showing you some fixes that I ran into while I was doing this um so let's go ahead and get started so actually let me just split the screen up so we can have a look at both them at once I'm in my Linux machine right now you just have to get to the terminal you notice that I don't even have a desktop and I'm literally just gonna start copying and pasting these commands now the first thing that we need to install is actually CUDA now CUDA is what allows us to use the CUDA cores on our GPU to actually run the code so just go ahead and keep copying these commands it will take a second and I actually already have this installed on my machine so I'm gonna go through the steps with you guys but again if anything is different on my machine that's probably because it's already installed so if you don't know how to copy it into a window like this you just right click on your mouse and it'll copy if you're using a server like I am but anyways we'll just go through all of these and keep going now I will have all these commands listed in my description as well and that should show you guys you know if the website goes down at any point you can just copy it from there as well so yeah it literally just keep going all we're doing here is adding the video packages we're gonna make sure we have the Nvidia drivers for our graphics card that are correct and then we're gonna go ahead and install tensorflow 2.0 so yep just go through these commands there's not really much for me to say as I copy these in and eventually we will get through them all alright so now we're gonna install the even a video driver you can see that's all commented out on this tensorflow website here copy that and I can just continue go I don't really have any commentary for you guys here so we'll copy this this is gonna install obviously the development and runtime libraries which we need and it says minimum four gigs or approximately four gigabytes which will mean that's how long it how many gigabytes is getting take up on a machine so this will take a second and I'll fast-forward through these stuff if it does take a while finally we're going to install tensor RT I don't even know what this is but apparently it's required and then after we're done this we should actually be finished installing everything that we need for tensorflow 2.0 to work again if you guys want to go through this just go to the website copy all these commands in order paste them into here and they should work properly now finally what we have to do is actually install tensorflow 2.0 so we've got all the dependents the dependencies installed and now to install tensorflow 2.0 we're just gonna say pip 3 install tensorflow and i believe we're gonna say - GPU and then equals equals 2.0 point I gotta find it up here too make sure that we do it correctly two-point 0.0 - alpha zero like that so then we'll do that and that should install tents flow 2.0 for us now I already have this installed but this will actually take a few minutes to install because there is quite a bit of stuff that it needs to download on your computer so anyways that has been it for installing tensorflow 2.0 on your computer using the GPU version again throughout the rest of the neural network series I'm gonna be going forward doing this on in a bunting machine so running all of the code I'll do the development and windows throw the files on my server train the model train the models excuse me and then take the models off and use them on my Windows machine so if you want to validate if this is working you can really quickly just do Python 3 in Linux and then you can cite do import tensorflow and doing that you shouldn't get any errors and if you don't get any errors then you have successfully installed tensorflow 2.0 now a few errors here because they're still listening and stuff wasn't working if for some reason when you install tensorflow and you notice that it's not using your GPU go ahead and uninstall the cpu version of tensorflow so just pip3 on on the install and then tensorflow and i guess you'd have to just do just tensorflow like that and that will install the cpu version if it is installed in your machine so anyways that has been it for how to install tensorflow 2.0 GPU version on a bun - pretty straightforward just go through copies commands if you guys have any questions or errors please just leave them in the comments below and i will try my best to help you up
Original Description
This tutorial will show you how to install tensorflow gpu on linux/ubuntu. Installing tensorflow gpu requires that you have a CUDA enabled gpu (typically a GTX1050ti 0r higher).
Tensorflow website: https://www.tensorflow.org/install/gpu
Playlist: https://www.youtube.com/watch?v=OS0Ddkle0o4&list=PLzMcBGfZo4-lak7tiFDec5_ZMItiIIfmj
Commands:
# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update
# Install NVIDIA driver
sudo apt-get install --no-install-recommends nvidia-driver-410
# Reboot. Check that GPUs are visible using the command: nvidia-smi
# Install development and runtime libraries (~4GB)
sudo apt-get install --no-install-recommends \
cuda-10-0 \
libcudnn7=7.4.1.5-1+cuda10.0 \
libcudnn7-dev=7.4.1.5-1+cuda10.0
# Install TensorRT. Requires that libcudnn7 is installed above.
sudo apt-get update && \
sudo apt-get install nvinfer-runtime-trt-repo-ubuntu1804-5.0.2-ga-cuda10.0 \
&& sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends libnvinfer-dev=5.0.2-1+cuda10.0
Want a sneak peak into my life? Follow my Instagram @tech_with_tim where I'm going to be filming a video each morning sharing my goals for the day and what I have planned:
https://www.instagram.com/tech_with_tim
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
https://tech-with-tim.teachable.com/p...
📸 Instagram: https://www.instagram.com/tech_with_tim
🌎 Website https://techwithtim.net
📱 Twitte
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Tech With Tim · Tech With Tim · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
A* Path Finding Algorithm(Visualization)
Tech With Tim
Python Programming Tutorial #1 - Variables and Data Types
Tech With Tim
Python Programming Tutorial #2 - Basic Operators and Input
Tech With Tim
Python Programming Tutorial #3 - Conditions
Tech With Tim
Python Programming Tutorial #4 - IF/ELIF/ELSE
Tech With Tim
Python Programming Tutorial #5 - Chained Conditionals and Nested Statements
Tech With Tim
Python Programming Tutorial #6 - For Loops
Tech With Tim
Python Programming Tutorial #7 - While Loops
Tech With Tim
Python Programming Tutorial #8 - Lists and Tuples
Tech With Tim
Python Programming Tutorial #9 - Iteration by Item (For Loops Continued...)
Tech With Tim
Python Programming Tutorial #10 - String Methods
Tech With Tim
How to Overclock a NVIDIA GPU
Tech With Tim
Python Programming Tutorial #11 - Slice Operator
Tech With Tim
Python Programming Tutorial #12 - Functions
Tech With Tim
Python Programming Tutorial #13 - How to Read a Text File
Tech With Tim
Python Programming Tutorial #14 - Writing to a Text File
Tech With Tim
Python Programming Tutorial #15 - Using .count() and .find()
Tech With Tim
Python Programming Tutorial #16 - Introduction to Modular Programming
Tech With Tim
Python Programming Tutorial #17 - Optional Parameters
Tech With Tim
Python Programming Tutorial #18 - Try and Except (Python Error Handling)
Tech With Tim
Python Programming Tutorial #19 - Global vs Local Variables
Tech With Tim
Python Programming Tutorial #20 - Classes and Objects
Tech With Tim
Cool VBS Script to Prank Your Friends!
Tech With Tim
How to Overclock an AMD GPU
Tech With Tim
Best GPU'S For Mining Ethereum (2018)
Tech With Tim
Recursion and Memoization Tutorial Python
Tech With Tim
Ethereum Mining Rig - Hardware Guide
Tech With Tim
Pygame Tutorial #1 - Basic Movement and Key Presses
Tech With Tim
How to Install Pygame (Windows 8/10)
Tech With Tim
How to Trade Your Cryptocurrency (Bitcoin, Ethereum etc.) For Cash!
Tech With Tim
How to Mine Ethereum 2018 - WORKING (Super-Easy)
Tech With Tim
Microphone Comparison - $10 Mic vs $150 Mic (Blue Yeti USB)
Tech With Tim
Pygame Tutorial #2 - Jumping and Boundaries
Tech With Tim
Pygame Tutorial #3 - Character Animation & Sprites
Tech With Tim
Pygame Tutorial #4 - Optimization & OOP
Tech With Tim
OBS Studio Tutorial - Best OBS Settings
Tech With Tim
Linear Search Algorithm - Python Example and Code
Tech With Tim
Make Any Mic Sound AMAZING! (WITH OBS)
Tech With Tim
Binary Search Algorithm - Python Example & Code
Tech With Tim
Pygame Tutorial #5 - Projectiles
Tech With Tim
Pygame Game - Mini Golf
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 1)
Tech With Tim
Pygame Tutorial - Projectile Motion (Part 2)
Tech With Tim
Pygame Tutorial #6 - Enemies
Tech With Tim
Pygame Tutorial #7 - Collision and Hit Boxes
Tech With Tim
Pygame Tutorial #8 - Scoring and Health Bars
Tech With Tim
Cloud Mining vs. Hardware Mining - 2018
Tech With Tim
How to Install Pygame on Mac OSX (Fast-Simple)
Tech With Tim
Pygame Tutorial #9 - Sound Effects, Music & More Collision
Tech With Tim
Pygame Tutorial #10 - Finishing Touches & Next Steps
Tech With Tim
How to Fade Your Screen in Pygame [CODE IN DESCRIPTION]
Tech With Tim
How to Create a Button in Pygame [CODE IN DESCRIPTION]
Tech With Tim
Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement
Tech With Tim
Pygame Side-Scroller Tutorial #2 - Random Object Generation
Tech With Tim
Pygame Side-Scroller Tutorial #3 - Collision
Tech With Tim
Pygame Side-Scroller Tutorial #4 - Scoring and End Screen
Tech With Tim
How to Create A Message Box in Python - Tkinter
Tech With Tim
Is Ethereum Mining Still Profitable - Is It Worth It (April 2018)
Tech With Tim
How to Run MAC OSX on a WINDOWS PC (Clover Boot-loader)
Tech With Tim
Programming Problem #1 - Alphabet Soup (Beginner/Novice)
Tech With Tim
More on: LLM Foundations
View skill →
🎓
Tutor Explanation
DeepCamp AI