Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ollewelin/4d9164fa30a9403e87c2ad193655f42a to your computer and use it in GitHub Desktop.
Save ollewelin/4d9164fa30a9403e87c2ad193655f42a to your computer and use it in GitHub Desktop.
Installation setup CUDA, cuDNN, OpenCV 3.4.1
Ubuntu 16.04
sudo apt-get update
CMake GUI
sudo apt-get install cmake-qt-gui
GTK2.0
sudo apt-get install gtk2.0
sudo apt-get install build-essential libgtk2.0-dev
==============
=== CUDA =====
==============
NVIDIA CUDA Installation Guide for Linux
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
get file from NVIDIA..
cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub
OK
sudo apt-get update
sudo apt-get install cuda
Reboot
test
copy sample
cd sample/.../nbody
make
./nbody
===============
=== cuDNN =====
===============
cuDNN
tar -xzvf cudnn-9.2-linux-x64-v7.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo dpkg -i libcudnn7_7.1.4.18-1+cuda9.2_amd64.deb
sudo dpkg -i libcudnn7-dev_7.1.4.18-1+cuda9.2_amd64.deb
sudo dpkg -i libcudnn7-doc_7.1.4.18-1+cuda9.2_amd64.deb
test
./mnistCUDNN
==============
=== OpenCV ===
==============
download
opencv-3.4.1.zip
Install Atlas
sudo apt-get install libatlas-base-dev
sudo apt-get install libblas-dev liblapack-dev
sudo apt install git
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make FC=gfortran
...detta tar en del tid....
$ sudo make PREFIX=/usr/local install
===== För Qt5 för bland annat tryck knappar i OpenCV GUI behövs inte ========
sudo apt-get install qtdeclarative5-dev qml-module-qtquick-controls
In CMakeGUI
Browse Source.. /home/welin/OpenCV-3.4.1/opencv-3.4.1
mkdir build
Browse Build.. /home/welin/OpenCV-3.4.1/opencv-3.4.1/build
Press Configure buttom One time check if some dependency or path are missining
Press Configure one time more
cd
welin@welin-Aspire-M3800:~/OpenCV-3.4.1/opencv-3.4.1/build$
sudo make
.... massor av tid ...
sudo make install
==========================
==== CodeBlocks IDE ======
==========================
http://ubuntuhandbook.org/index.php/2016/05/install-codeblocks-ide-ubuntu-16-04/
sudo add-apt-repository ppa:damien-moore/codeblocks-stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment