Install caffe on Ubuntu 14.04 with GTX 1080

前端之家收集整理的这篇文章主要介绍了Install caffe on Ubuntu 14.04 with GTX 1080前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


fork from : https://astrail.com/guide/


Install Ubuntu 14.04

  1. partition:
    1. swap: ~16 GiB
    2. /: ~100 GiB
    3. /home: the rest
  2. grub: use default setting
  3. Attention,if you cannot enter tty1-6:
    1. sudo gedit /etc/default/grub
    2. set GRUB_CMDLINE_LINUX_DEFAULT = nomodeset
    3. sudo update-grub
    4. sudo reboot

Install Nvidia driver 3xx.xx

  1. Ctrl+Alt+F1 (enter into tty1)
  2. sudo service lightdm stop (stop x-window service)
  3. sudo bash ./NVIDIA-Linux-x86_64-3xx.xx.run (latest version)
  4. sudo service lightdm start
Install CUDA 8.0
  1. sudo bash ./cuda_8.0.xx_linux-run.run (use .run version instead of .deb )
    1. DO NOT Install NVIDIA Accelerated Graphics Driver (n)
    2. choose y for other options
  2. sudo apt-get update
  3. sudo gedit /etc/ld.so.conf.d/cuda.conf (add)
    1. /usr/local/cuda/lib64
    2. /lib
  4. sudo ldconfig -v
Install cuDNN v5.x
  1. tar xzvf cudnn-8.0-linux-x64-v5.x.tgz
  2. sudo cp cuda/include/cudnn.h /usr/local/cuda/include
  3. sudo cp cuda/lib64/libcudnn.* /usr/local/cuda/lib64
  4. sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.5.x.x /usr/local/cuda/lib64/libcudnn.so.5
  5. sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.5 /usr/local/cuda/lib64/libcudnn.so
  6. sudo ldconfig -v
Install dependence
  1. sudo apt-get install -y build-essential git
  2. sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler protobuf-c-compiler libyaml-dev
  3. sudo apt-get install -y python-pip python-dev python-opencv python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags cython ipython
  4. sudo pip install --upgrade pip
  5. sudo pip install jupyter (optional)
Install BLAS
  1. choose ATLAS,MKL or OpenBLAS
  2. ATLAS:
    1. sudo apt-get install -y libatlas-base-dev
  3. MKL (optional):
    1. sudo bash install_GUI.sh
    2. sudo gedit /etc/ld.so.conf.d/intel_mkl.conf (add)
      1. /opt/intel/lib/intel64
      2. /opt/intel/mkl/lib/intel64
    3. sudo ldconfig -v
Install glog 0.3.3
  1. wget https://github.com/google/glog/archive/v0.3.3.tar.gz
  2. tar xzvf v0.3.3.tar.gz
  3. cd glog-0.3.3
  4. ./configure && make && make install
Install caffe
  1. git clone https://github.com/BVLC/caffe.git
  2. cd caffe
  3. cp Makefile.config.example Makefile.config
  4. gedit Makefile.config
    1. USE_CUDNN := 1 (del “#”)
    2. BLAS := atlas (or mkl,open)
    3. WITH_PYTHON_LAYER := 1 (del “#” to build with python support)
    4. MATLAB_DIR := /usr/local/MATLAB/R20xxx/ (del “#” to build with MATLAB support)
    5. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/lib/x86_64-linux-gnu/hdf5/serial/include
    6. LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
  5. make all -j8
  6. make test -j8 (optional)
  7. make runtest -j8 (optional)
  8. make pycaffe (optional)
  9. make matcaffe (optional)
Issues:
  1. Error ‘fatal error: pyconfig.h: No such file or directory’
    1. export CPLUS_INCLUDE_PATH=/usr/include/python2.7
  2. Login loop,cannot enter desktop

猜你在找的Ubuntu相关文章