UBUNTU 14.04 + CUDA 7.5 + CAFFE

Source: Internet
Author: User
Tags windows download intel mkl nvcc

This is also troubled me for a long time, before using Http://www.cnblogs.com/platero/p/3993877.html installation method, installed 567,890 times, always a problem.

Later found a new method, one night plus half the morning, installed the Ubuntu system (14.04) + NVIDIA driver + CUDA + CAFFE all done. Also ran the Mnist database, Shuangshuang a little problem. Specific steps:

1. Install Ubuntu, it is recommended to install English language version (I installed the 14.04 English language).

2. Install NVIDIA driver: Recommended Reference Blog http://blog.csdn.net/xizero00/article/details/43227019 (This is my classmate's blog, I use his method to install, good to explode).

1) First verify that you have Nvidia's graphics card (Http://developer.nvidia.com/cuda-gpus this site to see if you have GPU-capable graphics): $ LSPCI | Grep-i nvidia

2) Check your Linux distribution (mostly 64-bit or 32-bit): $ uname-m && cat/etc/*release

3) View GCC version: $ gcc--version

4) First download NVIDIA CUDA warehouse installation package (my is Ubuntu 14.04 64 bit, so download is ubuntu14.04 installation package, if you are 32 bit can see the specific address, the specific address is https:// Developer.nvidia.com/cuda-downloads)

$: wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_ Amd64.deb (This step is recommended not to download the terminal, direct Windows download, and then follow the steps)

5) After the download is complete, you can install it using the following command, note that the file name is modified to Cuda-repo-ubuntu1404_6.5-14_amd64.deb

$ sudo dpkg-i cuda-repo-<distro>_<version>_<architecture>.deb

6) Once the warehouse is installed, you can update your local warehouse.

$ sudo apt-get update

7) finally started to install Cuda and graphics driver (the installation of Cuda at the same time will be the graphics card drivers are also installed, this is really convenient. But the download time is a bit long. )

sudo apt-get install Cuda

It is important to note that the installation methods I provide here are different from the various installation methods on the network, and their methods are often complex

Mainly because: (1) Some tutorials are manual installation of video card drivers, manual shielding system of the default open source drive

(2) The installation of Cuda is also done by hand

There are a few things to keep in mind when using this method:

(1) cuda6.5 already does not support the old graphics card, so sm11 and so on must be deleted. can refer to my other article, about compiling the opencv3.0

(2) ubuntu14.04 is 64 bit, and do not update the system patches at the beginning of what, because the system has been updated, then install the video card driver will not be able to enter the graphical interface, I looked at the relevant log found to be stuck in the Dbus side. Therefore, I recommend that the installation of Ubuntu 14.04 do not update the system patches.

8) After installation you need to set the environment variables, in/etc/profile

    1. $ export Path=/usr/local/cuda-6.5/bin: $PATH
    2. $ export ld_library_path=/usr/local/cuda-6.5/lib64: $LD _library_path
    3. $ source/etc/profile

My classmate Blog said next choose whether to install Nvidia's sample, I feel that the previous step has been installed together, at least when I install the time is this, so this step is not required, no words installed separately.

Then do some verification work:

1. View the driver version of the video card

$ cat/proc/driver/nvidia/version

2. View the version of the NVCC compiler

$ nvcc-v I

3. Compile CUDA Sample code: $ cd ~/nvidia_cuda-6.5_samples, $ sudo make

4. After all compilation is complete, enter samples/bin/x86_64/linux/release and sudo to run devicequery,$ sudo./devicequery

Installing additional tools and libraries

1. Install Atlas (due to Intel MKL charges, Openblas installation is complex, Atlas is best installed, and Caffe default), one line of code: $sudo apt-get install libatlas-base-dev

2. Install OpenCV 2.4.9: This try not to install manually, someone on GitHub has already written the complete installation script: Https://github.com/jayrambhia/Install-OpenCV Download the script, Enter the ubuntu/2.4 directory to add executable permissions to all shell scripts.

1) $ chmod +x *.sh, $ sudo./opencv2_4_9.sh. Next, wait for the automatic installation.

My personal Humanities installation OpenCV the best way is to enter OPENCV in Ubuntu Software Center and then put all the displayed items on the installation.

3. Install additional dependencies: $ sudo apt-get install Libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-s Erial-dev Libgflags-dev Libgoogle-glog-dev Liblmdb-dev protobuf-compiler (one installation recommended)

4. Download Caffe, go to the Python directory under the Caffe directory: $ sudo apt-get install Python-dev python-pip,, $for req in $(cat requirements.txt); do sudo pip install $req; done

Now you're done: test it.

1) The CD enters the Caffe root directory, first copies a copy of the Makefile.config

2) $ CP Makefile.config.example Makefile.config

3) Make All-j8

Make Test

Make Runtest

Finally, you can install MATLAB ... (10,000 words omitted here ...) )

UBUNTU 14.04 + CUDA 7.5 + 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.