Skip to content

Instantly share code, notes, and snippets.

@arundasan91
Created July 27, 2018 15:46
Show Gist options
  • Save arundasan91/eddd7622aac853c01bd1adfb2e94cc18 to your computer and use it in GitHub Desktop.
Save arundasan91/eddd7622aac853c01bd1adfb2e94cc18 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt update
sudo apt install libhdf5-dev
sudo apt-get install -y opencl-headers build-essential protobuf-compiler libprotoc-dev libboost-all-dev libleveldb-dev hdf5-tools libhdf5-serial-dev libopencv-core-dev libopencv-highgui-dev libsnappy-dev libatlas-base-dev cmake libstdc++6-4.8-dbg libgoogle-glog0v5 libgoogle-glog-dev libgflags-dev liblmdb-dev git python-pip gfortran
sudo sh -c "sudo echo '/usr/local/cuda/lib64' > /etc/ld.so.conf.d/cuda_hack.conf"
sudo ldconfig /usr/local/cuda/lib64
pip install --upgrade --user pip
pip install scikit-image --user
cd /home/$USER/packages/
git clone https://github.com/BVLC/caffe.git
cd caffe
cd python
for req in $(cat requirements.txt); do sudo pip install --user --upgrade $req; done
cd ..
cp Makefile.config.example Makefile.config
sudo ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0 /usr/lib/x86_64-linux-gnu/libhdf5.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 /usr/lib/x86_64-linux-gnu/libhdf5_hl.so
make -j 8 all py
make -j 8 test
make runtest
echo "export PYTHONPATH=/home/$USER/packages/caffe/python:$PYTHONPATH" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment