Friday, May 15, 2015

Things to do when installing caffe in Ubuntu 14.04

- 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

- Install OpenBLAS
+ Compile OpenBLAS:
sudo apt-get install build-essential gcc g++ gfortran git libgfortran3
git clone
cd OpenBLAS
sudo make install
Add a file to/etc/ called openblas.conf, containing the path to your new libraries (/opt/openblas/lib). Then run sudo ldconfig.

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

sudo update-alternatives --config

+ Correct Makefile:
- Modify parameters in Makefile.config
- Compile Caffe
- Compile Pycaffe
- Test Caffe

No comments:

Post a Comment