Ubuntu 14.04 cuda7.5 Caffe Installation

Source: Internet
Author: User

Recent new contact depth learning starts with getting started: The new Installation Cuda,caffe installation process is simple, there are all over the Internet

1: Disable the Nouveau driver before you install Cuda

Press CTRL+ALT+F1 to enter the command prompt to create a new blacklist file

# sudo vi/etc/modprobe.d/blacklist-nouveau.conf

Input

Blacklist nouveauoptions nouveau modset=0

Save exit (: Wq)

And then execute

# sudo update-initramfs-u

Executive Lspci | grep nouveau See if there is content

# Lspci | grep nouveau

If there is no content, the description is disabled successfully, if there is content, reboot and then view

# sudo reboot

After restarting, enter the login screen, do not log into the desktop, directly press CTRL+ALT+F1 to enter the command prompt.

2: Cuda installation:

Https://developer.nvidia.com/cuda-downloads download the corresponding version of the Deb file,

Dpkg-i Cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb

sudo apt-get update

sudo apt-get install Cuda

Configure environment variables, etc.

Input:
sudo nano/etc/profile
-Add path= "$PATH:/usr/local/cuda-7.5/bin" on the last line of the file
-Then save and exit
Input:
Source/etc/profile
Input:
Echo $PATH
Input:
sudo nano/etc/ld.so.conf
-Write include/usr/local/cuda-7.5/lib64 on the second line
Note: If it is the first time, set the root password first
Input:
sudo passwd root
After the root password is set, enter Su to enter the root account.
Input: Ldconfig
Input: Exit

3: Install Caffe

Download Caffe First

# sudo git clone https://github.com/BVLC/caffe.git

Then install a bunch of third-party libraries

#sudo apt-get install Libatlas-base-dev#sudo apt-get install Libprotobuf-dev# sudo apt-get install libleveldb-dev# sudo apt-get install libsnappy-dev# sudo apt-get Install Libopencv-dev# sudo apt-get install Libboost-all-dev# sudo apt-get install Libhdf5-serial-dev# sudo apt-get install Libgflags-dev # sudo apt-get install Libgoogle-glog-dev# sudo apt-get install liblmdb-dev# sudo apt-get install Protobuf-compiler 

Next, compile the Caffe

# CD ~/caffe# sudo cp Makefile.config.example makefile.config#      make all

At this point, the Caffe installation is complete.

Configuring the Operating Environment

Caffe runtime needs to call Cuda Library, we create a new cafe.conf file under the/ETC/LD.SO.CONF.D directory, write the directory of the library we need

# sudo vi/etc/ld.so.conf.d/caffe.conf

Add Content:

/usr/local/cuda/lib64

Save exit (: Wq)

Update configuration

# sudo ldconfig

Ubuntu 14.04 cuda7.5 Caffe installation

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.