ubuntu14.04 caffe+cuda-7.0 Configuration

Source: Internet
Author: User
Tags cuda toolkit

First install Cuda:

Download from the NVIDIA official website: Cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb, there are two types of run and Deb, heavily recommended Deb format, easy to install

CD to the directory where Cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb is located, such as mine:

CD ~/software/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb

Perform:

sudo dpkg-i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb;

sudo apt-get update

sudo apt-get-y install cuda;

And then, here, more than 6.5 will automatically install the graphics driver, so the installation will appear after the Nvidia driver

Then configure the environment variables

Add cuda.conf files to/ETC/LD.SO.CONF.D

VI cuda.conf

/usr/local/cuda-7.0/lib64

Add the following in/etc/profile or ~/.BASHRC:

#cuda env
Path=/usr/local/cuda-7.0/bin: $PATH
Export PATH

Export ld_library_path=/usr/local/cuda-7.0/libnvvp:/usr/local/cuda-7.0/lib64: $LD _library_path

Final execution:

sudo ldconfig

and source ~/.BASHRC

On the line, and finally:

sudo reboot

For caffe installation configuration, refer to:

Http://www.cnblogs.com/platero/p/3993877.html

It is not recommended to install Anaconda, too large and if we do not need a python-like library, and there may be a variety of Python library can not find the problem

Finally, it is recommended to compile the caffe using Cmake-gui

The installation method is:

sudo apt-get install Cmake-qt-gui

Finally, a makefile file is generated and then executed under the appropriate path:

sudo make all

sudo make install

sudo make runtest

Just do it.

A final note:

I loaded the cuda before finally because I was in the configuration of Java when I used a wrong command caused me to delete the original cuda all;

and then I'm going to install it again. Then there are all sorts of problems in the middle, like :

http://blog.csdn.net/jkxsanger/article/details/8983107

No cuda-capable device is detected

The reference to this scheme is not resolved (but the direction is indicated):

Step1: Re-install NVIDIA CUDA Toolkit

sudo sh cuda_5.0.35_linux_64_rhel6.x-1.run

Step2: After successful installation, follow the prompts to configure the/etc/ld.so.conf file

My system is 64 bit so vim/etc/ld.so.conf add

/usr/local/cuda-5.0/lib64
/usr/local/cuda-5.0/lib

Save modification Exit:

Execute Command ldconfig

Step3: If you want more than one person to use the CUDA programming environment and the corresponding hardware resources

Modify the/etc/profile file

Export Path=/usr/local/cuda-5.0/bin: $PATH
Export ld_library_path=/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64: $LD _library_path

The Final Solution is:

Use the following command to first uninstall Cuda:

sudo apt-get--purge Remove Cuda

The previous step is just a partial uninstall and then need to be completely removed

sudo apt-get autoremove cuda

Then you need to completely uninstall the Nvidia driver:

Su doapt-get remove--purge nvidia-*sudo apt-' nouveau ' | sudo tee-a/etc/modules  

Reboot and then perform the new installation of the cuda-7.0 using the first method.

ubuntu14.04 caffe+cuda-7.0 Configuration

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.