Friday, May 15, 2015

Things to do when installing caffe in Ubuntu 14.04


https://github.com/BVLC/caffe/wiki/Installation

http://radar.oreilly.com/2014/07/how-to-build-and-run-your-first-deep-learning-network.html

http://www.joyofdata.de/blog/gpu-powered-deeplearning-with-nvidia-digits/


- Install dependencies
- Install Cudnn
tar -xzvf cudnn-6.5-linux-R1.tgz 
cd cudnn-6.5-linux-R1 
sudo cp lib* /usr/local/cuda-7.5/lib64/ 
sudo cp cudnn.h /usr/local/cuda-7.5/include/
sudo ldconfig 

When running with caffe/tensorflow with sudo
https://github.com/tensorflow/tensorflow/issues/2039


- Install OpenBLAS
+ Compile OpenBLAS:
sudo apt-get install build-essential gcc g++ gfortran git libgfortran3
git clone https://github.com/xianyi/OpenBLAS.git
cd OpenBLAS
make NO_AFFINITY=1 USE_OPENMP=1
sudo make install

https://hunseblog.wordpress.com/2014/09/15/installing-numpy-and-openblas/
Add a file to/etc/ld.so.conf.d/ called openblas.conf, containing the path to your new libraries (/opt/openblas/lib). Then run sudo ldconfig.


https://github.com/xianyi/OpenBLAS/wiki/faq

Then we can set alternative to our freshly-built library:
$ sudo update-alternatives --install /usr/lib/libblas.so.3 libblas.so.3 /opt/OpenBLAS/lib/libopenblas.so.0 41 \
   --slave /usr/lib/liblapack.so.3 liblapack.so.3 /opt/OpenBLAS/lib/libopenblas.so.0
Or remove redirection and switch back to APT-provided BLAS implementation order:
$ sudo update-alternatives --remove libblas.so.3 /opt/OpenBLAS/lib/libopenblas.so.0

sudo update-alternatives --config libblas.so.3

+ Correct Makefile:   https://github.com/BVLC/caffe/issues/314
- Modify parameters in Makefile.config
- Compile Caffe
- Compile Pycaffe
- Test Caffe

No comments:

Post a Comment