Caffe搭建手记_基于Ubuntu14.04LTS
原文:
https://blog.csdn.net/dawin_2008/article/details/52382237
CAFFE+Ubuntu14.04LTS+CUDA7.5+cuDNN+OpenCV3.0+OpenBLAS+Anaconda+Matlab R2014a
Ubuntu + Nvidia GPU + Docker
1、GPU驱动安装
见我的CSDN博客:blog.csdn.net/dawin_2008/article/details/52382237
CUDA和cudnn安装部分。
2、Docker和nvidia-docker安装
Docker安装:
-Powershell 代码
sudo gedit /etc/apt/apt.conf
底部添加如下代理信息:
-Powershell 代码
Acquire::http::Proxy "http://10.136.214.14:3128"; Acquire::https::Proxy "http://10.136.214.14:3128"; Acquire::https::Verify-Peer "false";
保存,执行:
-Powershell 代码
source /etc/apt/apt.conf
创建docker-gpg,见附件。
-Powershell 代码
sudo apt-key add docker-gpg
-Powershell 代码
add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
-Powershell 代码
sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common python-pip sudo apt-get install -y "docker-ce=18.03.1~ce-0~ubuntu"
其中docker-ce可选,根据具体情况选择。
Nvidia-docker安装:
proxy设置,添加proxy地址
-Powershell 代码
sudo gedit ~/.bashrc
在文件底部添加
-Powershell 代码
export http_proxy=http://10.136.214.14:3128 export https_proxy=http://10.136.214.14:3128 export GIT_SSL_NO_VERIFY=1
source一下
-Powershell 代码
source ~/.bashrc
接着,执行以下命令:
-Powershell 代码
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ tee /etc/apt/sources.list.d/nvidia-docker.list apt-get update
# Install nvidia-docker2 and reload the Docker daemon configuration
-Powershell 代码
sudo apt-get install -y nvidia-docker2
-Powershell 代码
sudo gedit /etc/docker/daemon.json
在daemon.json文件添加:
-Powershell 代码
{ "graph": "/data/docker", "insecure-registries": ["0.0.0.0/0"], "runtimes": { "nvidia": { "path": "/usr/bin/nvidia-container-runtime", "runtimeArgs": [] } } }
-Powershell 代码
sudo gedit /lib/systemd/system/docker.service
在docker.service添加:
-Powershell 代码
# BEGIN ANSIBLE MANAGED BLOCK Environment="HTTP_PROXY=http://10.136.214.14:3128" Environment="HTTPS_PROXY=http://10.136.214.14:3128" Environment="NO_PROXY=rnd-dockerhub.huawei.com,127.0.0.1,10.136.214.13" # END ANSIBLE MANAGED BLOCK
并执行以下命令:
-Powershell 代码
systemctl daemon-reload systemctl enable docker systemctl start docker
验证是否正确安装:
# Test nvidia-smi with the latest official CUDA image
docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
其中报错解决参考:
www.jianshu.com/p/95e397570896
3、配置全能深度学习框架群deepo
参考github.com/ufoym/deepo#Installation
-Html 代码
python
-Powershell 代码
import tensorflow import sonnet import torch import keras import mxnet import cntk import chainer import theano import lasagne import caffe import caffe2
全能的deepo全家桶,你值得拥有!
- 点赞
- 收藏
- 关注作者
评论(0)