docker安装和caffe安装

第一步:启动ubuntu安装docker

root@lyf-virtual-machine:~# apt-get install docker.io


第二步:

root@lyf-virtual-machine:~#sudo apt-get install apparmor


第三步:打开docker

root@lyf-virtual-machine:~# sudo service docker start

root@lyf-virtual-machine:~# docker ps      

 //列出当前所以运行的container



第四步:

root@lyf-virtual-machine:/home/lyf/liyongfen# docker load -i caffe-cpu-master.image.tar

//先复制caffe-cpu-master.image.tar到自己的目录下(liyongfen)


root@lyf-virtual-machine:/home/lyf/liyongfen# docker images 

 //将列出所有的容器镜像


第五步:

root@lyf-virtual-machine:/home/lyf/liyongfen# docker run -itd -p 2012:22 --name=lyf_caffe --hostname=LYF-CAFFE --privileged xd/caffe-cpu-master


第六步:

root@lyf-virtual-machine:/home/lyf/liyongfen#  docker start lyf_caffe

root@lyf-virtual-machine:/home/lyf/liyongfen# docker exec -it lyf_caffe /bin/bash

root@LYF-CAFFE:/# /etc/init.d/ssh start


第八步:第一次要设置密码

root@LYF-CAFFE:/# passwd 

root@LYF-CAFFE:/# rm -rf caffe/

root@LYF-CAFFE:/# cd opt
root@LYF-CAFFE:/opt# tar xvf caffe.tar   

要首先复制caffe.tar到opt文件下面


第九步:

 编译:

cp Makefile.config.example Makefile.config  (修改只让cpu跑)opt/caffe
# Adjust Makefile.config (for example, if using Anaconda Python, or if cuDNN is desired)
make all
make test
make runtest

mkdir build
cd build
cmake ..
make all
make install
make runtest

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值