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. PEP8-python编码规范(下)

    1.结尾逗号 结尾的逗号通常是可选的,除了在构成一个元素的元组时是强制性需要的(在Python 2 中,它们对 print 语句有语义).为了清晰起见,建议将后者用括号括起来(在技术上是多余的). Y ...

  2. 【Linux 网络编程】网络IP地址结构体

    (1)IPv4套接口地址结构通常也称为"网际套接字地址结构",它以"sockaddr_in"命名,        定义在<netinet/in.h> ...

  3. 小记------mongodb数据库如何进行模糊查询

    // 模糊匹配createTime   是以 2019-07-23 开头 db.getCollection('driver_online_record').find({"createTime ...

  4. zookeeper集群的搭建(CentOS 7)

    注意ip地址为: 虚拟机ip设置 TYPE="Ethernet"BOOTPROTO="static"NAME="enp0s3"DEVICE= ...

  5. 不要64 数位DP

    Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer). 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来 ...

  6. Elasticsearch操作索引

    目录 操作索引 1. 基本概念 2. 创建索引 2.1 语法 2.2查看索引设置 2.3.删除索引 2.4 映射配置 2.5 新增数据 2.6 修改数据 2.7 删除数据 3. 查询 3.1 基本查询 ...

  7. git部分命令笔记

    目录 配置user信息 建Git仓库 清空暂存区 git变更文件名 查看暂存区状态 查看历史 查看本地分支 查看所有分支(包含远程) 创建分支 基于远程分支创建本地新分支 查看图形化分支日志 图形化界 ...

  8. 从入门到自闭之python初识

    Day 01 整型: 对比: 在python 2 版本中有整型,长整型long 在python 3 版本中全部都是整型 用于计算和比较 整型和布尔值的转换 二进制转换成十进制: ​print (int ...

  9. python-day8(正式学习)

    目录 列表类型内置方法 常用操作+内置方法 优先掌握(***) 需要掌握(**) 存一个值or多个值 有序or无序 可变or不可变 元组类型内置方法 定义 常用操作+内置方法 优先掌握 一个值or多个 ...

  10. 深入解析Vue.js中v-bind v-model的使用和区别

    v-model 指令在表单控件元素上创建双向数据绑定,所谓双向绑定,指的就是我们在js中的vue实例中的data与其渲染的dom元素上的内容保持一致,两者无论谁被改变,另一方也会相应的更新为相同的数据 ...