Ubuntu16.04+cuda8.0+cudnn5.0+caffe

Source: Internet
Author: User

Ubuntu installation process (HDD installation) http://www.cnblogs.com/zhbzz2007/p/5493395.html
"But don't use Kylin edition!!!" A lot worse than the original experience!!! ”
Switch machine when the computer at the top of a line prompt flash,/dev/sda6:clean (unknown, single matter)
http://blog.csdn.net/xuezhisdc/article/details/48649575 (meaning)

1. Tutorial 1
http://blog.csdn.net/zwyjg/article/details/16371349

2. Tutorial 2
Https://jingyan.baidu.com/article/e4d08ffdace06e0fd2f60d39.html

Note the point:
1, partitioning, only the swap partition is not the primary partition, the other partitions are primary partitions, the partition format is EXT4
2, the boot loader to, boot\ partition
3, does not follow the default bootloader installation, after the installation is completed reboot and can not enter Ubuntu, and then into the W7, delete the previously installed add entries, add Linux boot, \boot partition
(see Add the following is the C-disk directory, not very clear, clearly the end of the disk installation, but in C drive must have its boot file)
Section details http://blog.csdn.net/arcsinsin/article/details/17143163

Subsequent:
Wireless driver Installation http://www.linuxdiyf.com/linux/27545.html
After networking, start configuring the environment

The first step is to install the video card driver, first install the driver, the bin and shielding Nouvea
1, online tutorial Download the installation package from the official website (installed a few times, the test failed, but found in the pure command line mode-(notebook fn+ctrl+alt+f1/return F7), install the driver would like in Windows DOS State, to first disable the graphical interface (sudo * * * stop), do not know why , install and enable (sudo * * * start))
2, updated from the system's own driver update, convenient
Test after loading
sudo nvidia-smi
If the installation is successful, the video card information will be displayed
Reboot (after mounting the NVIDIA driver, you should automatically block the Linux-powered Novea driver)

The second step is to pack cuda,
2.1 It is necessary to download the corresponding version of the installation package from the official website, preferably in the command-line mode of the easy-to-find address
Run sudo sh ****.run
Constant Spaces Skip Reminders
Input: Accept
Note If the issue is driver-mounted: N
Y/enter (default) keep going.

There will be a warning in the middle: incomplete install, because there are several installation dependencies (what ghost), not installed
Run
2.2 sudo apt-get install Freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev LIBGL1-MESA-GLX Libglu1-mesa LIBGL U1-mesa-dev
No unexpected process will be similar to the installation of unsuccessful hints, regardless of it, anyway, can not understand


2.3 More like environment variables and the like, is still in pure command line mode, so it is best to install vim, used to change the environment variables
sudo apt-get install vim
sudo vi/etc/profile
Add after opening
Export Path=/usr/local/cuda-8.0/bin: $PATH
Export ld_library_path=/usr/local/cuda-8.0/lib64: $LD _library_path

sudo ldconfig immediate effect, no accident here will be an error, the feeling should be 2.2 reasons, the solution
sudo mv/usr/lib/nvidia-375/libegl.so.1/usr/lib/nvidia-375/libegl.so.1.org
sudo mv/usr/lib32/nvidia-375/libegl.so.1/usr/lib32/nvidia-375/libegl.so.1.org
sudo ln-s/usr/lib/nvidia-375/libegl.so.375.39/usr/lib/nvidia-375/libegl.so.1
sudo ln-s/usr/lib32/nvidia-375/libegl.so.375.39/usr/lib32/nvidia-375/libegl.so.1
Note The version number may be different

Again
sudo idconfig should not have an error.
Restart

2.4 Testing
Nvcc-v should output Cuda version

The third step to install CUDNN
Find the official website, register the account, download the corresponding version of the compressed file, under any path decompression, the current folder running Terminal
Udo 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
sudo chmod a+r/usr/local/cuda/lib64/libcudnn*

CUDNN Installation Complete
Http://www.2cto.com/os/201607/528798.html

Fourth, Opencvan installation (OpenCV cmake should be the same as the cmake under window, but the mother to so many dependencies??? )

Download the corresponding version of opencv3.2.0 match cuda8.0
Decompression location

4.1, installation dependencies (different versions of the problem, ubuntu16.04) Https://help.ubuntu.com/community/OpenCV

sudo apt-get install Libopencv-dev build-essential checkinstall cmake pkg-config yasm libtiff5-dev libjpeg-dev libjasper- Dev Libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev Libgstreamer0.10-dev Libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libgtk2.0-dev Libfaac-dev Libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils

4.2. An unknown necessary step
cmake-d cmake_build_type=release-d cmake_install_prefix=/usr/local-d with_tbb=on-d build_new_python_support=on-d with_v4l=on-d install_c_examples=on-d install_python_examples=on-d build_examples=on-d with_qt=on-d WITH_OPENGL=ON- D enable_fast_math=1-d cuda_fast_math=1-d With_cublas=1.

There's this problem in my middle.
QT Problem Solving
I was able to solve the by using sudo apt-get install Qt5-default

Notice that you see these yes:
--Use Cuda:yes (ver 6.5)
--Use Opencl:yes
--
--NVIDIA CUDA
--Use Cufft:yes
--Use Cublas:yes
--Use Nvcuvid:no
--NVIDIA GPU arch:11 12 13 20 21 30 35
--NVIDIA PTX archs:30
--Use fast Math:yes

4.3. Make compile

Make-j8 for a long time, nearly 3 hours, but fortunately this compilation has no problem.

sudo make install after compiling

Sudo/bin/bash-c ' echo '/usr/local/lib ' >/etc/ld.so.conf.d/opencv.conf ' change environment variables

sudo ldconfig environment variable in effect

Reboot the system and restart the system after the CD to the build folder:

sudo apt-get install Checkinstall
sudo checkinstall
After Checkinstall is executed, a. tgz backup file that starts with backup is generated under the build file and a. deb installation file that starts with build, and executes dpkg-r build directly when you want to uninstall the current OPENCV.

Fifth step, ready to install Caffe
Tangled in the installation of MATLAB, or the installation of Python, I feel that both do not have to understand, and space size is not installed Matlab

5.1ubuntu16.04 do not know if there is a python or after the previous installation, put is already have python, so only need to install Python caffe dependencies (what a ghost!). )

Https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide
sudo apt-get update
sudo apt-get install-y build-essential cmake git pkg-config
sudo apt-get install-y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev Protobuf-compiler
sudo apt-get install-y Libatlas-base-dev
sudo apt-get install-y--no-install-recommends Libboost-all-dev
sudo apt-get install-y libgflags-dev libgoogle-glog-dev Liblmdb-dev
sudo apt-get install-y python-pip
sudo apt-get install-y Python-dev
sudo apt-get install-y python-numpy python-scipy

5.2 Installing Caffe
http://blog.csdn.net/autocyz/article/details/52299889

5.3 Test (http://www.cnblogs.com/yymn/articles/5018623.html)
Mnist Data Set Test

D $CAFFE _root
./data/mnist/get_mnist.sh
./examples/mnist/create_mnist.sh
./examples/mnist/train_lenet.sh | Tee res.out

There was a problem! Mom sells a lot of!!!!!!!!!!!!.
Check Failed:status = = cudnn_status_success (6 vs. 0) Cudnn_status_arch_mismatch
!!!!!!!!!!!!! My day, I do not white, installed a half-day, there is no super-cloud on the virtual machine good
The official CUDNN acceleration is not supported under 3.0, so you can only comment out the USE_CUDNN line in Makefile.config, and re-execute the following

There are a few more commands. (http://blog.csdn.net/autocyz/article/details/52299889)
Make All-j8
Make Runtest
Make Pycaffe
Make Matcaffe

Pan Wai: FASTER-RCNN
Http://www.cnblogs.com/CarryPotMan/p/5390336.html
Http://www.voidcn.com/blog/a125930123/article/p-6215083.html
The feeling should be confile not configured well, has downloaded the Supervessl makefile file for a detailed study
PY-R-FCN use Microsoft-version Caffe which are compatible with CUDNN 5. Later, consider upgrading CUDNN5

1, first down "Faster-rcnn-caffe" (I can not remember the installation of those dependent)

Reference: http://blog.csdn.net/nicky_lyu/article/details/53181434

But the second step of the dependency must have been done, and that's what I did:
sudo apt-get install PYTHON-OPENCV
sudo pip install Cython easydict
But I feel a little bit less installed dependencies
So after that has been an error!!!!

2, compile the Cython module (what ghost)
$ CD Py-faster-rcnn/lib
$ make

3 Compiling Caffe and Pycaffe
(A little error is reported here)

Modify the Makefile File
3.1, (experience, because their own cudnn can not be used) annotated use_cudnn=1 compiled by

3.2, (anyway reported some python error)
cuda8.0 changes to Makeconfig:
Include_dirs: = $ (python_include)/usr/local/include/usr/include/hdf5/serial/and
Library_dirs: = $ (python_lib)/usr/local/lib/usr/lib/usr/lib/x86_64-linux-gnu/hdf5/serial/

Under the Py-caffe/faster-caffe
3.3 (reported what's wrong, about TK) sudo apt-get install PYTHON-TK
CD $FRCN _ROOT/CAFFE-FAST-RCNN

3.4 (No module named ' Yaml ' #)
sudo apt-get install Python-yaml

Make-j8

Compiled by

Make Test
There is a layer.vision mistake, the error file of this header file comment is good

Make Runtest
This step only runs on the cloud, the time is long, and there is no error, you can omit

Make Pycaffe
It's supposed to compile something python.


4, running (various errors in the process, but fortunately there are google! (in fact, some of them should be running in the wrong!) ))
4.1 Download Model
Typically downloaded using a different browser, placed in the Py-caffe data (new Fasterrcnnmodels)

4.2
./tools/demo.py
Check Failed:error = = cudasuccess (8 vs. 0) Invalid device function
NMS Note (what ghost)/lib/fast_rcnn/config.py line No. 205, change __c.use_gpu_nms = ture to __c.use_gpu_nms = False

Pan outer Film
The original github after remote changes to:
Git pull Origin Master
(Feel the cloud in sync with the local meaning!) )
Before you can upload
Git push Origin Master

Notepad (language Adjustment)
Http://shouce.jb51.net/notepad_book/npp_func_code_hl.html

Make test error (What the hell is this command)
http://hammer2505.cn/2016/10/16/deeplearning1/
Run for a long time!!!!!!!!!

Black screen (guessing video card conflict)
https://my.oschina.net/eechen/blog/227134

Ubuntu16.04+cuda8.0+cudnn5.0+caffe

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.