Centos下Caffe環境搭建

來源:互聯網
上載者:User

網上各路大神的配置很繁瑣 其實官網

http://caffe.berkeleyvision.org/installation.html的配置和安裝步驟很簡單 而且針對了不同環境 所以我建議大家不要按照xx的blog來,做個參考可以(包括我的) 。遇到錯誤的時候再Google,避免走彎路。


首先更新yum源

cd /etc/yum.repos.d/mv CentOS-Base.repo CentOS-Base.repo_bakwget http://mirrors.163.com/.help/CentOS7-Base-163.repowget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repowget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repoyum clean allyum makecache













按照官網的安裝依賴庫

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


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



yum install atlas-devel


yum install python-devel


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


然後就是編譯,按照官網步驟(-j8是用多線程,加快速度):

cp Makefile.config.example Makefile.config# Adjust Makefile.config (for example, if using Anaconda Python, or if cuDNN is desired)make all -j8make testmake runtest


在編譯過程中有可能會出現cblas和atlas兩個庫找不到的錯誤,更改Makefile.config檔案,解決方案如下:



OK,安裝完畢,我相信對絕大對數人而言比較複雜的步驟是CUDA安裝,但是這步我已經很熟練了,而且我們的CUDA早就配置好了。




相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.