一、环境
系统:
CentOS Linux 7
配置:
内存:31.1 GiB
CPU:Intel® Core™ i7-9700 CPU @ 3.00GHz × 8
显卡:Intel® HD Graphics (Coffeelake 3x8 GT2)
GNOME:Version 3.28.2
OS type:64-bit
二、编译安装
注:下面的所有下载均可参阅:https://blog.csdn.net/Tosonw/article/details/102837508
1. 安装yum依赖
$ sudo yum install gcc gcc-c++ glibc_headers libtool gtk2-devel vim git autoconf automake boost-devel bzip2 unzip
如果使用sudo命令报错:xxx is not in the sudoers file. This incident will be reported
,参阅:https://blog.csdn.net/msllws/article/details/102821050
2. 安装conda
$ bash ./Miniconda3-4.5.4-Linux-x86_64.sh
# 按照提示输入即可
Do you accept the license terms? [yes|no]
[no] >>> yes
Miniconda3 will now be installed into this location:
/home/cyhc/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/cyhc/miniconda3] >>>
Do you wish the installer to prepend the Miniconda3 install location
to PATH in your /home/cyhc/.bashrc ? [yes|no]
[no] >>> no
Python环境配置:
配置conda内的Python-3.6
为默认python环境:
# 打开环境变量文件
$ gedit ~/.bashrc
# 在末尾添加:
# added by Miniconda3 installer
export PATH="/home/user/miniconda3/bin:$PATH"
export LD_LIBRARY_PATH=/home/user/miniconda3/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
注意:PATH里的user
需要改为自己的用户名。
3. caffe依赖protobuf
因为caffe要和tensorflow自带的protobuf统一,是个大坑,所以要下载protobuf-3.6.0
版本:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.0
$