ubuntu16.04 installing the GPU version of Caffe

Source: Internet
Author: User

Even if the installation method is found, everyone's system is somewhat different, there are always some pits to step on to know the actual situation is how. My environment is Lenovo V480 + Ubuntu 16.04 + GeForce GT 645M. The installation process is referenced in this blog--ubuntu 16.04 installation configuration Caffe graphic details. The steps to be completed are:

  1. Install related dependencies
  2. Installing the NVIDIA Driver
  3. Cuda Installation
  4. Configure CUDNN
  5. Installing OPENCV
  6. Installing Caffe
  7. Test

The blogger's process is very detailed, but there are some details about my problems that are different. I keep a record of my problems and hope that people with the same problems can get help

  1. NVIDIA Graphics driver installation
  2. Installing OPENCV
  3. Installing Caffe
  4. Postscript
1.NVIDIA Graphics driver Installation

Start to install NVIDIA graphics card driver into a "building kernel" interface, the middle of the progress of the card in 100% for a long time, I thought the installation has been completed to force shutdown. But the boot discovery notebook becomes super slow, and the query graphics driver also displays undefined commands. This only realizes that the graphics card driver is not installed. The actual entire installation process is really time-consuming, and there is no hint, so do not shut down, patience waiting for him to finish. There are two warnings in the middle, one at a time to prompt "Pre-install script failed ...", and I choose to continue with the installation. Another time is to indicate what configuration, I also choose to continue. The installation concludes with the prompt "unable to find a suitable destination to install 32-bit compatibility". I'm not quite able to understand why installing a 64-bit driver involves a 32-bit matching problem.
The first time after loading the system is still a problem, on the one hand, the resolution is not correct, on the other hand loop into the login interface. The solution is to refer to this blog for Ubuntu installation after the nvidia driver Desktop Loop login issue. The nvidia driver files are removed and then used

sudo ./NVIDIA-Linux-x86_64-375.20.run –no-x-check –no-nouveau-check –no-opengl-files

Of course the driver file name is your own. This time in the Tty1 terminal, the installation did not stop the X-windows service, found that there is no impact on the installation. This time the driver installs successfully, but the resolution still has the question, uses this blog ubuntu16.04 to set the screen resolution with Xrandr, and does not fail after the reboot. The graphics card driver has finally been corrected here.

However, the information that the input "Nvidia-smi" pops up shows that the GPU's process name entry is not supported. I'm looking at other people's views. Some people think that this is Nvidia's display of the old graphics card is incorrect, but in fact the graphics card is also working. Some people think that the new driver is not compatible with the graphics card, so the video card does not work properly, causing the CPU to actually be set in the assume task. However, no matter how it does not affect the subsequent installation and Caffe operation.

2. Installing OPENCV

My notebook has been installed OpenCV, this thought can not install, so directly to Caffe installation, the results of a problem. So put the OpenCV uninstalled and then recompile and install it again. The result is beyond imagination. Originally OPENCV only with one hours or so can be installed to complete, did not expect in the CUDA environment for 5 hours before the completion of the compilation. Maybe my computer is too slag. So OPENCV must be installed after the CUDA environment has been configured.

A warning appears repeatedly in the installation OpenCV not used because“ OPENCV_TRAITS_ENABLE_DEPRECATED ”has been defined . This warning pops up almost every time a file is compiled. Practice has shown that this warning does not affect the eventual execution of the program. As long as there is no error,warning generally can be ignored.

Installation of 3.caffe

To this step is the biggest pit. The previous steps according to the blogger's tutorial, although a little different, but the direction is not a problem, a little bit of a correction on their own can be. But Caffe's compilation blogger was wrong.

In general, we use the source file installation method is the use of the following steps

mkdir buildcd buildcmake ..make

However, bloggers are ready to use some of the file settings make all -j8 . I didn't think much of it at the time, just follow the order. However, no matter how you modify nvcc fatal: Unsupported gpu architecture ‘compute_20‘ the error prompts that appear. Changed 3 times, just realize that seems to have not done cmake. This will install successfully.

4. PostScript

At the time of the test it was really slow, it could be that my notebook was too slag, or it could be that the graphics driver and the graphics card didn't fit, so GPU acceleration didn't work. Anyway, this is the first step. Now used first, later on the calculation of the requirements can be loaded into the cloud, or buy better computing resources.

ubuntu16.04 installing the GPU version of 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.