TI caffe-jacito安装记录

cuda的安装

先安装显卡驱动,在安装cuda,注意不要选第一个驱动,最后报错但时不要理会

  • caffe的安装
  1. Preparation
  • copy Makefile.config.example into Makefile.config
  • In Makefile.config, uncomment the line that says WITH_PYTHON_LAYER
  • Uncomment the line that says USE_CUDNN
  • If more than one GPUs are available, uncommenting USE_NCCL will help us to enable multi gpu training.
  1. Install all the pre-requisites - (mostly taken from http://caffe.berkeleyvision.org/install_apt.html)
  • Change directory to the folder where caffe source code is placed.
  • sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
  • sudo apt-get install --no-install-recommends libboost-all-dev
  • sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
  • sudo apt-get install libturbojpeg
  • Install CUDNN. (libcudnn-dev developer deb package can be downloaded from NVIDIA website) and then installed using dpkg -i path-to-deb
  • Install NCCL if there are more than one CUDA GPUs in the system
  • Install the python packages required. (this portion is not tested and might need tweaking) -- For Anaconda Python:
    for req in $(cat python/requirements.txt); do conda install $req; done -- For System default Python:
    for req in $(cat python/requirements.txt); do pip install $req; done
  • There may be other dependencies that are discovered as one goes through with the compilation process. The installation procedure will be similar to above.
  1. Compilation
  • make (Instead, one can also do "make -j50" to speed up the compilaiton)
  • make pycaffe (To compile the python bindings)
  1. Notes:
  • If you get compilation error related to libturbojpeg, create the missing symbolic link as explained here:
    -- https://github.com/OpenKinect/libfreenect2/issues/36
    -- sudo ln -s /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0.0.0 /usr/lib/x86_64-linux-gnu/libturbojpeg.so

  • Building on Ubuntu 18.04 may face some road blocks - but they are solvable. The exact solution may vary slightly depending on the packages in your system. The following are some guidelines:
    (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.
    -- conda remove opencv
    -- conda install -c menpo opencv3
    (2) There may be symbol errors related to protobuf. Uninstalling system probuf library and installing anaconda protobuf package solved the issue in our case.
    -- sudo apt remove libprotobuf-dev
    -- conda install protobuf
    (3) If using CUDA 10, the following error may occur. cmake error: CUDA_cublas_device_LIBRARY (ADVANCED) 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.

安装pycaffe
1.在caffe-master/python 下有一个requirement.txt,里面有所需要安装的所有库。

cd caffe-master/python
for req in $(cat requirements.txt); do pip install $req; done

2.CXX/LD -o python/caffe/_caffe.so .build_release/src/caffe/layers/python_layer.o
python/caffe/_caffe.cpp:11:10: fatal error: numpy/arrayobject.h: 没有那个文件或目录
 #include <numpy/arrayobject.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:535: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1

解决方法:

需要安装 python-numpy
sudo apt-get install python-numpy

3.ImportError: No module named caffe

解决方案:把caffe目录下的python目录,添加到环境变量中

export PYTHONPATH=/work/project/caffe/python:$PYTHONPATH

4.from google.protobuf.internal import enum_type_wrapper ImportError: No module named google.protobuf

sudo pip install protobuf

5.tidl

https://e2e.ti.com/support/processors/f/791/p/727622/2715287

6.参考链接

https://blog.csdn.net/u010801994/article/details/81745513

https://blog.csdn.net/u011021773/article/details/81298666

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值