Deep learning Environment Setup for Ubuntu 18.04 (LTS)

Source: Deep Learning on Medium

Deep learning Environment Setup for Ubuntu 18.04 (LTS)

Many of us know how deep learning works theoretically but when we start practicing it, we need to know how to setup a environment where we can run and build our DL model successfully. DL models can build with many frameworks (tensorflow,pytorch,caffe…etc). So the environment we build should support all the frame works and build models with CPU and GPU support. Normally deeplearning data sources are most of the times images or matrix …. and it require more computational power to process the input data.

Below are the steps required to setup your environment to start and run your DL models :

  1. ######### Steps for GPU Computation ########

Step 1 : Your system should be UBUNTU 18.04 LTS

Step 2 : Install NVIDIA graphics drivers on your system.

Install Nvidia drivers

Step 3 : Install CUDA toolkit 10.1

Step 4 : Install cuDNN for CUDA 10.1

Step 5 : Install OpenCV 3.4 recommended for detecting objects in video

Step 6: ###### Install CUDA Toolkit #######

a) Download cuda toolkit 10.1 for better support (.deb file)

https://developer.nvidia.com/cuda-10.1-download-archive-base

b) sudo dpkg -i cuda-repo-ubuntu1804–10–1-local-10.1.105–418.39_1.0–1_amd64.deb

c) sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub

d) sudo apt-get update

e) sudo apt-get install cuda

f) sudo add-apt-repository ppa:graphics-drivers/ppa

some imp settings : [sudo nano ~/.bashrc]

We also need to include the paths for the CUDA 10.1

export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}

export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

g) Reboot your PC

h) Nvidia-smi (only work after rebooting)

Gencode link :

Hope this post helps you or guide you towards your first steps of deep learning setup…. Happy deeplearning 🙂