Skip to content

Instantly share code, notes, and snippets.

@tzutalin
Last active November 26, 2015 08:12
Show Gist options
  • Save tzutalin/b24937905a2480da1723 to your computer and use it in GitHub Desktop.
Save tzutalin/b24937905a2480da1723 to your computer and use it in GitHub Desktop.
installCaffeDep.sh
#!/bin/sh
sudo apt-get install -y git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libopenblas-dev
sudo apt-get install liblapack-dev
ubunut_version=`lsb_release --release | cut -f2`
echo $ubunut_version
if [ "$ubunut_version" = "12.04" ]; then
sudo apt-get install unzip
# To build gflag, need CMAke version is 2.8.12 or higher
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz
tar xzvf cmake-2.8.12.tar.gz
cd cmake-2.8.12
./configure
make -j4
sudo make install
# glog
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make && sudo make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make && sudo make install
# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && sudo make install
else
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
fi
sudo apt-get install the python-dev
# install caffe. Stable version forked by other: https://github.com/muupan/caffe/tree/dqn
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config
sudo apt-get install python-scipy python-skimage libqt4-core libqt4-gui libqt4-dev libzmq-dev ; sudo pip install -U scikit-image; sudo pip install pyzmq; sudo pip install protobuf; sudo pip install pygments
sudo pip install protobuf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment