Skip to content

Instantly share code, notes, and snippets.

@jhjin
Last active October 20, 2016 05:30
Show Gist options
  • Save jhjin/dc49c6894ece8704f103860f4165e67f to your computer and use it in GitHub Desktop.
Save jhjin/dc49c6894ece8704f103860f4165e67f to your computer and use it in GitHub Desktop.
a quick script for installing Caffe on Mac
brew install python
brew install wget
brew install protobuf
brew install boost-python
brew install lmdb
brew install leveldb
brew install snappy
brew install gflags
brew install glog
brew tap homebrew/science
brew install opencv
brew install opencv3
brew unlink opencv
brew link opencv3 --force
brew install hdf5
brew install graphviz
# use clang instead of gcc5
pip install numpy
pip install scipy
pip install Cython
pip install scikit-image
pip install protobuf
pip install lmdb
pip install leveldb
pip install python-gflags
pip install h5py
pip install matplotlib
pip install pydot
git clone https://github.com/BVLC/caffe.git
cd caffe
wget https://gist.githubusercontent.com/jhjin/2a64f0d22892353ec8ceaa782fe4c165/raw/ccc121664359499e0c6b55226ff50d2a8a2ecaa6/Makefile.config
make -j8 && make pycaffe
export PYTHONPATH=~/caffe/python:$PYTHONPATH
python
# then try "import caffe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment