Caffe CentOS64位 GPU安装

本文假设普通的yum,pip,git等都已安装好。

  1. sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel

  2. sudo yum install openblas-devel.x86_64 gcc-c++.x86_64 numpy.x86_64 scipy.x86_64 python-matplotlib.x86_64 lapack-devel.x86_64 python-pillow.x86_64 libjpeg-turbo-devel.x86_64 freetype-devel.x86_64 libpng-devel.x86_64 openblas-devel.x86_64

  3. sudo yum install gflags-devel glog-devel lmdb-devel

  4. sudo git clone https://github.com/BVLC/caffe.git

  5. cd caffe/python

  6. for req in ‘cat requirements.txt’ ; do sudo pip install $req; done

  7. cd caffe

  8. cp Makefile.config.example Makefile.config

  9. vim Makefile.config

  10. sudo make -j4
    这里出错了,如下
    LD -o .build_release/lib/libcaffe.so.1.0.0 /bin/ld: cannot find -lcblas /bin/ld: cannot find -latlas 解决方法 sudo yum install libatlas-base-dev sudo yum install atlas-devel vim Makefile.config 增加下面两行 BLAS_INCLUDE := /usr/include BLAS_LIB := /usr/lib64/atlas 还是不行 找到那个lib下,又重新link了一下 cd /usr/lib64/atlas sudo ln -s libtatlas.so.3.10 libcblas.so sudo ln -s libsatlas.so.3.10 libatlas.so sudo make -j4

  11. sudo make test

  12. sudo make runtest

  13. sudo make pycaffe -j4

  14. 为了保证在python中可以import caffe,在.bash_profile中添加
    PYTHONPATH=$PYTHONPATH:youpath/caffe/python export PYTHONPATH
    source .bash_profile

总结一下,第一次make,有个.h文件找不到,居然是因为忘了加sudo了。后来又有个.so一直找不到,按照网上的方法都试了还是不行,最后找到那个lib下,我看着有点像,但名字和要的不太一样,又重新link了一下,终于ok了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值