I would like to write a story about building an environment from a clean Ubuntu 14.04 environment until 3D-CNN using caffe can be used with python.
It is assumed that you have root privileges. "I think this is the fastest"
Download pyenv = install. Just don't forget to install it as it uses git.
sudo apt-get install git
git clone git://github.com/yyuu/pyenv.git ~/.local/pyenv
Add the following to .bashrc to pass the path to the save location
export PYENV_ROOT=~/.local/pyenv #Required for pyenv install after this
export PATH=$PYENV_ROOT/bin:$PATH
eval "$(pyenv init -)"
Don't forget to source.
source ~/.bashrc
(Reference: [I built a python environment on Ubuntu using pyenv.](Http://www.takunoko.com/blog/ubuntu%E3%81%ABpython%E3%82%92%E3%82% A4% E3% 83% B3% E3% 82% B9% E3% 83% 88% E3% 83% BC% E3% 83% AB% E3% 81% 97% E3% 81% BE% E3% 81% 97% E3% 81% 9F% E3% 80% 82 /))
Insert anaconda into pyenv and make it the default python environment.
pyenv install anaconda-2.3.0 #It takes about 10 minutes
pyenv global anaconda-2.3.0
Environmental improvement of anaconda
conda install protobuf
(Reference: How to use 3D-CNN with Caffe in TSUBAME 2.5)
sudo apt-get install libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev python-numpy
sudo apt-get install --no-install-recommends libboost-all-dev
(Reference: Caffe --Ubuntu Installation)
git clone https://github.com/jmerkow/caffe.git ~/.local/caffe
cd ~/.local/caffe
cp Makefile.config.example Makefile.config
Modify Makefile.config. The environment at hand doesn't have a GPU.
-# CPU_ONLY := 1
+CPU_ONLY := 1
Run make
make all
make test
make runtest
make pycaffe
Modify .bashrc again. Please source after this.
export PYTHONPATH=~/.local/caffe/python:$PYTHONPATH
So far, on the python interpreter
import caffe
If it goes well, it's OK. accomplished.
Under construction. I would like to show an example of running 3D-CNN.
--Creating a version of the procedure that uses OpenBLAS instead of atlas --Execution of learning using caffe
Recommended Posts