fork from : https://astrail.com/guide/
Install Ubuntu 14.04
- partition:
- swap: ~16 GiB
- /: ~100 GiB
- /home: the rest
- grub: use default setting
- Attention,if you cannot enter tty1-6:
- sudo gedit /etc/default/grub
- set GRUB_CMDLINE_LINUX_DEFAULT = nomodeset
- sudo update-grub
- sudo reboot
Install Nvidia driver 3xx.xx
- Ctrl+Alt+F1 (enter into tty1)
- sudo service lightdm stop (stop x-window service)
- sudo bash ./NVIDIA-Linux-x86_64-3xx.xx.run (latest version)
- sudo service lightdm start
Install CUDA 8.0
- sudo bash ./cuda_8.0.xx_linux-run.run (use .run version instead of .deb )
- DO NOT Install NVIDIA Accelerated Graphics Driver (
n
) - choose
y
for other options
- DO NOT Install NVIDIA Accelerated Graphics Driver (
- sudo apt-get update
- sudo gedit /etc/ld.so.conf.d/cuda.conf (add)
- /usr/local/cuda/lib64
- /lib
- sudo ldconfig -v
Install cuDNN v5.x
- tar xzvf cudnn-8.0-linux-x64-v5.x.tgz
- sudo cp cuda/include/cudnn.h /usr/local/cuda/include
- sudo cp cuda/lib64/libcudnn.* /usr/local/cuda/lib64
- sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.5.x.x /usr/local/cuda/lib64/libcudnn.so.5
- sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.5 /usr/local/cuda/lib64/libcudnn.so
- sudo ldconfig -v
Install dependence
- sudo apt-get install -y build-essential git
- 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
- 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
- sudo pip install --upgrade pip
- sudo pip install jupyter (optional)
Install BLAS
- choose ATLAS,MKL or OpenBLAS
- ATLAS:
- sudo apt-get install -y libatlas-base-dev
- MKL (optional):
- sudo bash install_GUI.sh
- sudo gedit /etc/ld.so.conf.d/intel_mkl.conf (add)
- /opt/intel/lib/intel64
- /opt/intel/mkl/lib/intel64
- sudo ldconfig -v
Install glog 0.3.3
- wget https://github.com/google/glog/archive/v0.3.3.tar.gz
- tar xzvf v0.3.3.tar.gz
- cd glog-0.3.3
- ./configure && make && make install
Install caffe
- git clone https://github.com/BVLC/caffe.git
- cd caffe
- cp Makefile.config.example Makefile.config
- gedit Makefile.config
- USE_CUDNN := 1 (del “#”)
- BLAS := atlas (or mkl,open)
- WITH_PYTHON_LAYER := 1 (del “#” to build with python support)
- MATLAB_DIR := /usr/local/MATLAB/R20xxx/ (del “#” to build with MATLAB support)
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/lib/x86_64-linux-gnu/hdf5/serial/includeLIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
- make all -j8
- make test -j8 (optional)
- make runtest -j8 (optional)
- make pycaffe (optional)
- make matcaffe (optional)
Issues:
- Error ‘fatal error: pyconfig.h: No such file or directory’
- export CPLUS_INCLUDE_PATH=/usr/include/python2.7
- Login loop,cannot enter desktop