]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/blob - INSTALL.md
installation instructions updated
[jacinto-ai/caffe-jacinto.git] / INSTALL.md
1 # Installation
3 *The following is a brief summary of installation instructions. For more details, please see Caffe's original instructions in the appendix below*.
5 The installation instructions for Ubuntu 14.04 can be summarized as follows (the instructions for other Linux versions may be similar).  
6 1. Pre-requisites
7  * It is recommended to us a Linux machine (Ubuntu 14.04 or Ubuntu 16.04 for example)
8  * [Anaconda Python 2.7](https://www.continuum.io/downloads) is recommended, but other Python packages might also work just fine. Please install Anaconda2 (which is described as Anacoda for Python 2.7 int he download page). We have seen compilation issues if you install Anaconda3. If other packages that you work with (eg. tensorflow or pytorch) require Python 3.x, one can always create conda environments for it in Anaconda2.
9  * One or more graphics cards (GPU) supporting NVIDIA CUDA. GTX10xx series cards are great, but GTX9xx series or Titan series cards are fine too.
10  
11 2. Preparation
12  * copy Makefile.config.example into Makefile.config
13  * In Makefile.config, uncomment the line that says WITH_PYTHON_LAYER
14  * Uncomment the line that says USE_CUDNN
15  * If more than one GPUs are available, uncommenting USE_NCCL will help us to enable multi gpu training.
16  
17 3. Install all the pre-requisites - (mostly taken from http://caffe.berkeleyvision.org/install_apt.html)
18  * Change directory to the folder where caffe source code is placed.
19  * *sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler*
20  * *sudo apt-get install --no-install-recommends libboost-all-dev*
21  * *sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev*
22  * *sudo apt-get install libturbojpeg*
23  * Install CUDNN. (libcudnn-dev developer deb package can be downloaded from NVIDIA website) and then installed using dpkg -i path-to-deb
24  * Install [NCCL](https://github.com/NVIDIA/nccl/releases) if there are more than one CUDA GPUs in the system
25  * Install the python packages required. (this portion is not tested and might need tweaking)
26   -- For Anaconda Python: <br> *for req in $(cat python/requirements.txt); do conda install $req; done*
27   -- For System default Python: <br> *for req in $(cat python/requirements.txt); do pip install $req; done* 
28  * There may be other dependencies that are discovered as one goes through with the compilation process. The installation procedure will be similar to above.
30 4. Compilation
31  * *make* (Instead, one can also do "make -j50" to speed up the compilaiton)
32  * *make pycaffe* (To compile the python bindings)
33  
34 5. Notes:
35  * If you get compilation error related to libturbojpeg, create the missing symbolic link as explained here:<br>
36  -- https://github.com/OpenKinect/libfreenect2/issues/36 <br>
37  -- sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so
39  * <b>Building on Ubuntu 18.04 may face some road blocks</b> - but they are solvable. The exact solution may vary slightly depending on the packages in your system. The following are some guidelines: <br>
40   (1) One issue is related to the opencv python package provided by anacoda. The solution is to remove that opencv python package (if you have it) and then install another one as follows.<br>
41  -- conda remove opencv <br>
42  -- conda install -c menpo opencv3 <br>
43   (2) There may be symbol errors related to protobuf. Uninstalling system probuf library and installing anaconda protobuf package solved the issue in our case. <br>
44  -- sudo apt remove libprorobuf-dev <br>
45  -- conda install protobuf
46   (3) If using CUDA 10, the following error may occur.
47 cmake error: CUDA_cublas_device_LIBRARY (ADVANCED) 
48 This is due to an issue with cmake. Using cmake version >= 3.12.2 solves this issue. If anaconda has been installed recently, a recent version of cmake will be there in the anaconda bin directory and you can use it.
50 6. Appendix: Caffe's original instructions
51  * See http://caffe.berkeleyvision.org/installation.html for the latest
52 installation instructions.
53  * Check the users group in case you need help:
54 https://groups.google.com/forum/#!forum/caffe-users