y下载

https://github.com/BVLC/caffe

https://github.com/BVLC/caffe/archive/master.zip

gcc  

caffe安装 有2个问题 :

1,镜像系统类型,版本要求

2,是否使用cudnn(gpu) caffe要调用cudnn部分文件编译 (如用,cuda cudnn版本要求)


ubuntu1604-py35-nvidia-tensorflow1.14-cuda9.0-cudnn7.05

nvcc

2 nvcc -V

3 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4 yum install wget

5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

6 wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

7 yum clean all

8 yum makecache

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

10 yum install gflags-devel glog-devel lmdb-devel make

11 export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH

12 export CUDA_HOME=/usr/local/cuda-9.0/

13 wget https://github.com/BVLC/caffe/archive/master.zip

14 unzip master.zip

15 yum install unzip

16 unzip master.zip

17 cd caffe-master/

18 ll

19 cd python/

20 ll

21 for req in $(cat requirements.txt); do pip install $req; done

22 yum install pip

23 yum install pip-devel

24 yum install python-pip

25 for req in $(cat requirements.txt); do pip install $req; done

26 c

27 for req in $(cat requirements.txt); do pip install -i https://mirrors.aliyun.com/pypi/simple/ $req; done

28 for req in $(cat requirements.txt); do pip install $req; done

29 wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz

30 pwd

31 cd /usr/local/src/

32 ls

33 wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz

34 xz -d Python-3.6.4.tar.xz

35 tar xvf Python-3.6.4.tar

36 cd Python-3.6.4

37 ./configure prefix=/usr/local/python3

38 make && make install

39 mv /usr/bin/python /usr/bin/python.bak

40 ln -s /usr/local/python3/bin/python3.6 /usr/bin/python

41 python -V

42 vi /usr/bin/yum

43 vi /usr/libexec/urlgrabber-ext-down

44 cd -

45 cd /caffe-master/python/

46 yum install python-pip3

47 yum install python-pip3-devel

48 yum install python3-pip

49 for req in $(cat requirements.txt); do pip install $req; done

50 python

51 cd /usr/local/src/

52 wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26

53 tar -zxvf setuptools-19.6.tar.gz

54 cd setuptools-19.6

55 python3 setup.py build

56 python setup.py build

57 python setup.py install

58 ls /usr/local/python3/bin/pip3

59 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

60 pip3 -V

61 cd /caffe-master/python/

62 ls

63 for req in $(cat requirements.txt); do pip3 install -i https://mirrors.aliyun.com/pypi/simple/ $req; done

64 for req in $(cat requirements.txt); do pip3 install $req; done

65 for req in $(cat requirements.txt); do pip3 install -i http://mirrors.aliyun.com/pypi/simple/ $req; done

66 vi ~/.pip/pip.conf

67 mkdir [global]

68 mkdir ~/.pip

69 vi ~/.pip/pip.conf

70 for req in $(cat requirements.txt); do pip3 install -i http://mirrors.aliyun.com/pypi/simple/ $req; done

71 for req in $(cat requirements.txt); do pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done

72 for req in $(cat requirements.txt); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done

73 python -m pip install --upgrade --force pip

74 easy_install -U setuptools

75 python -m pip install --upgrade --force pip

76 pip install --upgrade pip

77 for req in $(cat requirements.txt); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done

78 history

https://blog.csdn.net/kemgine/article/details/78781377

Caffe-GPU编译问题:nvcc fatal : Unsupported gpu architecture 'compute_20'

NVCC src/caffe/layers/bnll_layer.cu

nvcc fatal : Unsupported gpu architecture 'compute_20'

Makefile:594: recipe for target '.build_release/cuda/src/caffe/layers/bnll_layer.o' failed

make: *** [.build_release/cuda/src/caffe/layers/bnll_layer.o] Error 1

仔细查看了一下 Makefile.config 中 CUDA_ARCH 设置未按规定设置:

CUDA architecture setting: going with all of them.

For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.

For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.

For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.

CUDA_ARCH := -gencode arch=compute_20,code=sm_20

-gencode arch=compute_20,code=sm_21

-gencode arch=compute_30,code=sm_30

-gencode arch=compute_35,code=sm_35

-gencode arch=compute_50,code=sm_50

-gencode arch=compute_52,code=sm_52

-gencode arch=compute_60,code=sm_60

-gencode arch=compute_61,code=sm_61

-gencode arch=compute_61,code=compute_61

因为我装的是CUDA9.0所以把下面这两行删除就可以了

-gencode arch=compute_20,code=sm_20 \-gencode arch=compute_20,code=sm_21 \

https://gitlab.com/nvidia/container-images/cuda/blob/master/dist/centos7/10.1/runtime/cudnn7/Dockerfile

Caffe安装错误及其解决方法

https://blog.csdn.net/jessir/article/details/71195115

caffe编译的问题解决:“cublas_v2.h: No such file or directory

具体来说:

CUDA7.5中的include、lib路径是安装目录下/usr/local/cuda-7.5/targets/x86_64-linux/下面的include和lib

将其分别添加到caffe根目录下Makefile.config中的"INCLUDE_DIRS"、“LIBRARY_DIRS”后面就可以了。

make all

make test


cudnn-8.0/9.0/10.0-linux-x64-v6.0/7.0/7.1/7.2/7.3/7.4.tgz下载

https://blog.csdn.net/xiangxianghehe/article/details/79177833

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.1/cudnn-9.2-linux-x64-v7.3.1.20.tgz #cuda9.2 cudnn7.3

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.2-linux-x64-v7.2.1.38.tgz #cuda9.2 cudnn7.2

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.1.4/cudnn-9.2-linux-x64-v7.1.tgz #cuda9.2 cudnn 7.1

http://file.ppwwyyxx.com/nvidia/cudnn-9.2-linux-x64-v7.4.2.24.tgz

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.0.5/cudnn-9.1-linux-x64-v7.tgz # cuda9.1 cudnn7.0

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.1.4/cudnn-9.0-linux-x64-v7.1.tgz

wget http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.0/cudnn-9.0-linux-x64-v7.3.0.29.tgz

make: /usr/local/cuda/bin/nvcc: Command not found

make: *** [.build_release/cuda/src/caffe/layers/absval_layer.o] Error 127

centos 7 安装caffe

https://blog.csdn.net/wqzghost/article/details/48264477

安装

https://juejin.im/post/5a0e819b6fb9a04524056583 在CentOS 7上安装Caffe

1.安装基础依赖库

sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
sudo yum install gflags-devel glog-devel lmdb-devel

2.安装CUDA

sudo rpm -i cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64.rpm
sudo yum clean all
sudo yum install cuda 环境变量
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/usr/local/cuda-8.0/

3.安装cuDNN

cp include/* /usr/local/cuda/include
cp lib64/* /usr/local/cuda/lib64

4.安装BLAS

sudo yum install atlas-devel
cd /usr/lib64/atlas
sudo ln -sv libsatlas.so.3.10 libcblas.so
sudo ln -sv libsatlas.so.3.10 libatlas.so

5.下载Caffe源码

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

6.安装python 依赖

进入caffe/python目录,安装requirements中依赖库

for req in $(cat requirements.txt); do pip install $req; done

7.编译

编辑Caffe 目录Makefile.config 文件,根据依赖库情况修改配置: 主要修改如下:
USE_CUDNN := 1
BLAS := atlas
BLAS_INCLUDE := /usr/include/atlas
BLAS_LIB := /usr/lib64/atlas
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/lib64/python2.7/site-packages/numpy/core/include
PYTHON_LIB := /usr/lib64 编译和测试Caffe,-j选项为编译并行线程数,一般为CPU核数
make all -j8
make test -j8
make runtest -j8

Caffe 使用示例

1.运行Caffe
进入Caffe 安装目录,执行./build/tools/caffe,可以根据caffe命令选项使用
./build/tools/caffe
caffe: command line brew
usage: caffe <command> <args> commands:
train train or finetune a model
test score a model
device_query show GPU diagnostic information
time benchmark model execution time
2.MNIST 例子
进入Caffe目录,执行如下命令
下载数据集:
./data/mnist/get_mnist.sh
转换数据集:
./examples/mnist/create_mnist.sh
训练例子:
./examples/mnist/train_lenet.sh 训练输出示例如下:

安装caffe

yum install epel-release

yum install atlas-devel snappy-devel boost-devel leveldb leveldb-devel hdf5 hdf5-devel glog glog-devel gflags gflags-devel protobuf protobuf-devel opencv opencv-devel lmdb lmdb-devel

yum -y install gcc automake autoconf libtool make

安装参考,但是失败了

https://blog.csdn.net/qq_33144323/article/details/81261367

失败错误为

[root@0e04e413eadd caffe]# make all
CXX src/caffe/blob.cpp
In file included from ./include/caffe/common.hpp:19:0,
from ./include/caffe/blob.hpp:8,yum
from src/caffe/blob.cpp:4:
./include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No such file or directory
#include <cublas_v2.h>
^
compilation terminated.
make: *** [.build_release/src/caffe/blob.o] Error 1

yum install atlas-devel snappy-devel boost-devel leveldb leveldb-devel hdf5 hdf5-devel glog glog-devel gflags gflags-devel protobuf protobuf-devel opencv opencv-devel lmdb lmdb-devel

需求

jupyterlab 中使用caffe ,并且caffe能使用GPU, c++代码编写

centos7 下caffe GPU版的配置和TensorFlow gpu版本的安装
https://blog.csdn.net/qq_33144323/article/details/81261367

nvidia 官网

https://developer.nvidia.com/?destination=node/18866

centos 7 安装CUDA9.0 +CUDNN

https://www.jianshu.com/p/a201b91b3d96

编译caffe-gpu-cuda及cudnn-tar 下载地址的更多相关文章

  1. CUDA各版本官方下载地址

    一.CUDA各版本官方下载地址 地址:https://developer.nvidia.com/cuda-toolkit-archive 二.说明 备忘,平时找个版本太难找了.

  2. ubuntu16.04+caffe+GPU+cuda+cudnn安装教程

    步骤简述: 1.安装GPU驱动(系统适配,不采取手动安装的方式) 2.安装依赖(cuda依赖库,caffe依赖) 3.安装cuda 4.安装cudnn(只是复制文件加链接,不需要编译安装的过程) 5. ...

  3. 【软件安装与环境配置】ubuntu16.04+caffe+nvidia+CUDA+cuDNN安装配置

    前言 博主想使用caffe框架进行深度学习相关网络的训练和测试,刚开始做,特此记录学习过程. 环境配置方面,博主以为最容易卡壳的是GPU的NVIDIA驱动的安装和CUDA的安装,前者尝试的都要吐了,可 ...

  4. 真实机下 ubuntu 18.04 安装GPU +CUDA+cuDNN 以及其版本选择(亲测非常实用)【转】

    本文转载自:https://blog.csdn.net/u010801439/article/details/80483036 ubuntu 18.04 安装GPU +CUDA+cuDNN : 目前, ...

  5. 非root用户安装cuda和cudnn

    1.根据自己的系统在官网下载cuda (选择runfile(local)) https://developer.nvidia.com/cuda-downloads 2.进入下载目录,并执行 sh cu ...

  6. 判断OpenCV是否为共享库,Windows基于CMake编译Caffe需要opencv共享库

    判断OpenCV是否为共享库,Windows基于CMake编译Caffe需要opencv共享库 TLDR 只考虑windows下opencv预编译包的情况. 对于opencv2.4.x系列,cmake ...

  7. caffe搭建--caffe- win10 vs2015 编译(支持GPU)--注意在cmake的时候需要根据情况仔细修改配置

    --http://blog.csdn.net/longji/article/details/60964998 注意: 在cmake的时候需要根据情况仔细修改配置,比如,如果gpu的能力不足3.0的话, ...

  8. 【神经网络与深度学习】【CUDA开发】【VS开发】Caffe+VS2013+CUDA7.5+cuDNN配置过程说明

    [神经网络与深度学习][CUDA开发][VS开发]Caffe+VS2013+CUDA7.5+cuDNN配置过程说明 标签:[Qt开发] 说明:这个工具在Windows上的配置真的是让我纠结万分,大部分 ...

  9. 56 Marvin: 一个支持GPU加速、且不依赖其他库(除cuda和cudnn)的轻量化多维深度学习(deep learning)框架介绍

    0 引言 Marvin是普林斯顿视觉实验室(PrincetonVision)于2015年提出的轻量化GPU加速的多维深度学习网络框架.该框架采用纯c/c++编写,除了cuda和cudnn以外,不依赖其 ...

  10. Caffe使用新版本CUDA和CuDNN

    因为一些原因还是需要使用别人基于Caffe的代码,但是代码比较老,默认不支持高版本的cuda或者cudnn 怎么办呢?基本上就是把最新官方Caffe-BVLC的几个关键文件拿过来替换即可. 脚本如下: ...

随机推荐

  1. 【VS开发】 自己编写一个简单的ActiveX控件——详尽教程

    最近开始学ActiveX控件编程,上手不太容易,上网想找相关教程也没合适的,最后还是在师哥的指导下完成了第一个简单控件的开发,现在把开发过程贴出来与大家分享一下~ (环境说明--平台:vs2005:语 ...

  2. python+selenium下载文件——Chrome

    from selenium import webdriver import time options = webdriver.ChromeOptions() prefs = { 'profile.de ...

  3. ORA-01406:提取的列值被截断 ; SQL Server :将截断字符串或二进制数据

    oracle 数据库可以正常连接,表数据也可以正常读取, 但在程序中相同的位置,有时会报错,有时不会报错,有的电脑会报错,有的不会 报错内容为 ORA-01406:提取的列值被截断 查了网上提供的一些 ...

  4. [CF750G] New Year and Binary Tree Paths

    目录 简单的 组合的 题目链接 简单的 设从节点\(x\)开始不断往左儿子走h-1步,则编号和为\(x\sum_{i=0}^{h-1}2^i=x(2^h-1)\). 若倒数第\(i\)步走向的是右儿子 ...

  5. Python基础数据类型str字符串

    3.3字符串str ' ' 0 切片选取 [x:y] 左闭右开区间 [x:y:z] 选取x到y之间 每隔z选取一次(选取x,x+z,....) z为正 索引位置:x在y的左边 z为负 索引位置:x在y ...

  6. NSIS打包软件使用

    NSIS打包软件使用 最近做的一个调用远程桌面的小应用需要打个安装包,并且在安装的时候需要添加注册表,我之前使用的都是"Advanced Installer"来打包应用程序的,这个 ...

  7. 如何使用Resource资源文件

    一.目的 为了能够在DisplayAttribute中重复使用同样的名称,将所有的显示字符串集中管理. 二.方法 1.DisplayAttribute本身支持直接使用资源文件. [Display(Re ...

  8. 使用了框架iframe的页面如何跳出框架

    "window.location.href"."location.href"是本页面跳转. "parent.location.href" 是 ...

  9. Go基础学习

    Go基础学习 go的基础语法 fmt.Println("hello world!") //go采用行分隔符 关键字 下面列举了 Go 代码中会使用到的 25 个关键字或保留字: b ...

  10. 10分钟,让你彻底明白Promise原理

    什么是Promise?本代码用定外卖来举例子,让你明白. // 定外卖就是一个Promise,Promist的意思就是承诺// 我们定完外卖,饭不会立即到我们手中// 这时候我们和商家就要达成一个承诺 ...