Skip to content

Commit 796c588

Browse files
committed
replace bundled install instructions with link to site
1 parent ad08dd1 commit 796c588

File tree

1 file changed

+4
-91
lines changed

1 file changed

+4
-91
lines changed

INSTALL.md

+4-91
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,7 @@
11
# Installation
22

3-
To build and test Caffe do
3+
See http://caffe.berkeleyvision.org/installation.html for the latest
4+
installation instructions.
45

5-
cp Makefile.config.example Makefile.config
6-
make
7-
make test
8-
make runtest
9-
10-
You will probably need to adust paths in `Makefile.config` and maybe the
11-
`Makefile` itself.
12-
Feel free to issue a pull request for a change that may help other people.
13-
14-
Note that building and running CPU-only works, but GPU tests will naturally
15-
fail.
16-
17-
We mostly used Ubuntu 12.04 for development, and here we describe the
18-
step-to-step guide on installing Caffe on Ubuntu.
19-
We have also successfully compiled caffe on OS X 10.8.5, using homebrew-installed libraries.
20-
21-
## Prerequisites
22-
23-
* CUDA
24-
* Boost
25-
* MKL (but see the boost-eigen branch for a boost/Eigen3 port)
26-
* OpenCV
27-
* glog, gflags, protobuf, leveldb, snappy
28-
* For the Python wrapper: python, numpy (>= 1.7 preferred), and boost_python
29-
* For the Matlab wrapper: Matlab with mex
30-
31-
Caffe requires the CUDA NVCC compiler to compile its GPU code. To install CUDA, go to the [NVidia CUDA website](https://developer.nvidia.com/cuda-downloads) and follow installation instructions there. Caffe is verified to compile with both CUDA 5.0 and 5.5.
32-
33-
Caffe also needs Intel MKL as the backend of its matrix computation and vectorized computations. We are in the process of removing MKL dependency, but for now you will need to have an MKL installation. You can obtain a [trial license](http://software.intel.com/en-us/intel-mkl) or an [academic license](http://software.intel.com/en-us/intel-education-offerings) (if you are a student).
34-
35-
If you would like to compile the Python wrapper, you will need to install python, numpy and boost_python. You can either compile them from scratch or use a pre-packaged solution like [Anaconda](https://store.continuum.io/cshop/anaconda/) or [Enthought Canopy](https://www.enthought.com/products/canopy/). Note that if you use the Ubuntu default python, you will need to apt-install the `python-dev` package to have the python headers.
36-
37-
If you would like to compile the Matlab wrapper, you will need to install Matlab.
38-
39-
You will also need other packages, most of which can be installed via apt-get using:
40-
41-
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev
42-
43-
The only exception being the google logging library, which does not exist in the Ubuntu 12.04 repository. To install it, do:
44-
45-
wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
46-
tar zxvf glog-0.3.3.tar.gz
47-
./configure
48-
make && make install
49-
50-
After setting all the prerequisites, you should modify the `Makefile.config` file and change the paths to those on your computer.
51-
52-
## Compilation
53-
54-
After installing the prerequisites, simply do `make all` to compile Caffe. If you would like to compile the Python and Matlab wrappers, do
55-
56-
make pycaffe
57-
make matcaffe
58-
59-
Optionally, you can run `make distribute` to create a `build` directory that contains all the necessary files, including the headers, compiled shared libraries, and binary files that you can distribute over different machines.
60-
61-
To use Caffe with python, you will need to add `/path/to/caffe/python` or `/path/to/caffe/build/python` to your `PYTHONPATH`.
62-
63-
Now that you have compiled Caffe, check out the [MNIST demo](mnist.html) and the pretrained [ImageNet example](imagenet.html).
64-
65-
## Compiling on OS X.
66-
67-
OS X 10.9 (Mavericks) is currently not supported, because current (5.5) CUDA compilers link against libstdc++, while 10.9 compilers link against libc++.
68-
On 10.8, we have successfully compiled and run caffe on GPU-equipped Macbook Pros.
69-
70-
From a clean install of the OS (or from a wiped `/usr/local`), install [homebrew](http://brew.sh/), then `brew install python`, then `brew install boost --build_from_source`.
71-
The reason to build boost from source is so that it links against the homebrew python.
72-
Homebrew handles all the other dependencies as well: `opencv`, `leveldb`, etc.
73-
For python packages like `numpy` and `scipy`, we recommend doing `brew tap homebrew/python`, and then installing them with homebrew.
74-
CUDA and MKL are very straightforward to install; download from NVIDIA and Intel websites.
75-
76-
Here are the relevant parts of the Makefile.config after all this:
77-
78-
CUDA_DIR := /Developer/NVIDIA/CUDA-5.5
79-
MKL_DIR := /opt/intel/mkl
80-
PYTHON_INCLUDES := /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/include/python2.7 /usr/local/lib/python2.7/site-packages/numpy/core/include
81-
PYTHON_LIB := /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib
82-
CXX=/usr/bin/clang++
83-
84-
Don't forget to set `PATH` and `LD_LIBRARY_PATH`:
85-
86-
export PATH=/Developer/NVIDIA/CUDA-5.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
87-
export LD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.5/lib:/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib:/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib:/usr/local/lib:/usr/lib:/lib
88-
89-
Additionally, MKL requires `DYLD_LIBRARY_PATH` to be set:
90-
91-
export MKL_DIR=/opt/intel/composer_xe_2013_sp1.1.103
92-
export DYLD_LIBRARY_PATH=$MKL_DIR/compiler/lib:$MKL_DIR/mkl/lib
93-
94-
Note that we still need to include the MKL `compiler/lib` in our paths, although we do not explicitly link against this directory in the Makefile.
6+
Check the issue tracker in case you need help:
7+
https://github.com/BVLC/caffe/issues

0 commit comments

Comments
 (0)