Last active
April 19, 2016 10:10
-
-
Save sio2boss/1966fac2f66122e24d2e to your computer and use it in GitHub Desktop.
Torch7 And Caffe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Need to install CUDA first | |
# Need to update with cuDNN procedure | |
# Dependencies | |
sudo apt-get install -y libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler cmake git curl clang python-pip python-dev build-essential | |
sudo pip install --upgrade pip | |
# Install Torch | |
if [ -e /usr/local/bin/th ]; then | |
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/clean-old.sh | bash | |
fi | |
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash | |
# Install Caffe | |
git clone --depth=1 https://github.com/BVLC/caffe.git | |
cd python | |
for req in $(cat requirements.txt); do sudo pip install $req; done | |
cd .. | |
mkdir -p build | |
#curl -L https://gist.githubusercontent.com/sio2boss/55d116e1f8bf0e73f0d6/raw/5a9e7c10f41bbddb1787a1fe3fc5a2784c5fa024/caffe-cudnn.patch | patch -p1 | |
cd build | |
cmake -DCMAKE_CXX_COMPILER=clang++ .. | |
make | |
make runtest | |
# Run alexnet | |
cd .. | |
build/tools/caffe time --model=models/bvlc_alexnet/deploy.prototxt --gpu=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment