Coder Social home page Coder Social logo

manual_tf_gpu's Introduction

Manual_tf_GPU

This is a step by step guide to install latest version of TensorFlow on GPU

07/01/2022

Tested successfully on Windows 10 & NVIDIA Quadro T1000 with Max-Q Design

Why manual installation ?

After many tries to get things done using "conda install tensorflow-gpu", It failed and gives a ton of errors. So I propose doing things manually to save time. And to make sure everything is well installed. This is a manual installation guide of TensorFlow to avoid any kind of errors.

Step 1: Hardware check

  • Using DxDialog check GPU series and version

Step 2: Install driver (I already have it)

Step 3: Install Visual Studio IDE

Step 4: Install CUDA Toolkit

Step 5: Install cuDNN

  • Create account or log in
  • Make sure to choose the version suitable with CUDA 11.5
  • V 8.3.1
  • https://developer.nvidia.com/cudnn
  • Download the zip folder. Decompress it in C:\tools\

Step 6: Add environment variables

1.	C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\bin
2.	C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\libnvvp
3.	C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5\include
4.	C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\extras\CUPTI\lib64
5.	C:\tools\cuda-windows-x86_64-8.3.1.22_cuda11.5-archive\bin
6.	C:\tools\cuda-windows-x86_64-8.3.1.22_cuda11.5-archive\include

(*) check paths depending on your OS and used versions !

Step 7: Install Miniconda3

Step 8: Install Jupyter

  • Go to Anaconda Prompt (base)
# conda install -y jupyter
  • Test by launching a notebook
# jupyter notebook

Step 9: Create a new environment

  • Create a new environment called: tensorflow
# conda create -y --name tensorflow python=3.9
  • Activate the new environment
# conda activate tensorflow

Step 10: Jupyter Kernel

  • Use Anaconda Prompt
  • Navigate to ‘tensorflow’ environment
# conda install ipykernel
# python -m ipykernel install --user --name tensorflow --display-name "Python 3.9 (tensorflow)"
  • Check the environment in Jupyter notebook

Step 11: Install TensorFlow

# pip install tensorflow
  • Installed latest version at this day: 2.7
  • Check installation
> import tensorflow as tf
> print(tf.__version__)
> print(len(tf.config.list_physical_devices('GPU'))>0) # should return True

Step 12: Install additional packages for our project

(tensorflow) # pip install pandas
(tensorflow) # pip install pillow
(tensorflow) # pip install tensorflow-addons
(tensorflow) # pip install pydot
(tensorflow) # pip install matplotlib

References

manual_tf_gpu's People

Contributors

ikrambenabdelouahab avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.