Running an official image

You can run one of the automatic builds. E.g. for the CPU version:

docker run -ti bvlc/caffe:cpu caffe --version

or for GPU support (You need a CUDA 8.0 capable driver and nvidia-docker):

nvidia-docker run -ti bvlc/caffe:gpu caffe --version

You might see an error about libdc1394, ignore it.

Docker run options

By default caffe runs as root, thus any output files, e.g. snapshots, will be owned by root. It also runs by default in a container-private folder.

You can change this using flags, like user (-u), current directory, and volumes (-w and -v). E.g. this behaves like the usual caffe executable:

docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) bvlc/caffe:cpu caffe train --solver=example_solver.prototxt

Containers can also be used interactively, specifying e.g. bash or ipython instead of caffe.

docker run -ti bvlc/caffe:cpu ipython
import caffe
...

The caffe build requirements are included in the container, so this can be used to build and run custom versions of caffe. Also, caffe/python is in PATH, so python utilities can be used directly, e.g. draw_net.pyclassify.py, or detect.py.

Building images yourself

Examples:

docker build -t caffe:cpu cpu

docker build -t caffe:gpu gpu

You can also build Caffe and run the tests in the image:

docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"

docker--caffe的更多相关文章

  1. docker[caffe&&pycaffe]

    0 引言 今天花了一天,完成了整个caffe的dockerfile编写,其支持python3.6.6,这里主要的注意点是protobuf的版本(在3.6.0之后,只支持c11),还有在制作镜像的时候注 ...

  2. Docker Caffe部署

    Caffe是一个清晰而高效的深度学习框架,纯粹的C++/CUDA架构,支持命令行.Python和MATLAB接口:可以在CPU和GPU直接无缝切换 Caffe的优势 上手快:模型与相应优化都是以文本形 ...

  3. Ubuntu 16.04 使用docker资料汇总与应用docker安装caffe并使用Classifier(ros kinetic+usb_cam+caffe)

    Docker是开源的应用容器引擎.若想简单了解一下,可以参考百度百科词条Docker.好像只支持64位系统. Docker官网:https://www.docker.com/ Docker - 从入门 ...

  4. docker下使用caffe的命令记录

    查看所有的images sudo docker images 利用某个image生成container sudo docker run -it --net=host -v /home/tingting ...

  5. docker安装caffe

    [最近一直想要学习caffe,但是苦苦纠结于环境安装不上,真的是第一步都迈不出去,还好有docker的存在!下面,对本人如何利用docker安装caffe做以简单叙述,不属于教程,只是记录自己都做了什 ...

  6. Error when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60'

    issue: Error when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60' rea ...

  7. Caffe学习系列(三)Docker安装及一些问题的记录

    前言: Docker安装倒是很简单,按照步骤轻松完成,但是在联网方面还是出现问题,大概是伟大的祖国防火墙将其拦下,但在开发中要遇山开山,见水搭桥.在其中我将解决方法记录下来,每次解决了困难想分享找不到 ...

  8. docker下安装caffe

    1.安装docker 2.下载caffe docker镜像 docker pull bvlc/caffe:gpu 可以去https://hub.docker.com/search/?q=SSD%20c ...

  9. windows10下基于docker的bvlc/caffe环境搭建与使用

    docker 安装参见docker官网,当cmd出现以下图像时安装正确; 然后进行bvlc/caffe环境创建,有两种,一种是直接pull github的bvlc,一种是本地创建image,直接使用g ...

  10. caffe 的docker安装过程及相关linux操作总结

    一.caffe 和 docker的安装编译 docker pull caffe镜像(注意使用docker安装省去安装CUDA和cudnn的安装.) 安装相关依赖包 安装opencv3(使用源码安装) ...

随机推荐

  1. 【Luogu】P1251餐巾计划(上下界费用流)

    题目链接 学了一下上下界费用流,似乎很nb.但是我说得不好,所以这里给出博客链接. 某dalao的博客 然后这道题的解法就是先用上下界费用流的建图方式连早上和晚上之间的那条边,保证当天一定会有r条或以 ...

  2. HDU——1465不容易系列之一(错排公式)

    不容易系列之一 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...

  3. Spark2.1.0之源码分析——事件总线

    阅读提示:阅读本文前,最好先阅读<Spark2.1.0之源码分析——事件总线>.<Spark2.1.0事件总线分析——ListenerBus的继承体系>及<Spark2. ...

  4. LibreOJ2097 - 「CQOI2015」任务查询系统

    Portal Description 给出\(n(n\leq10^5)\)个任务,和总时间范围\(m(m\leq10^5)\).每个任务有开始/结束时间\(s_i,e_i(1\leq s_i \leq ...

  5. NOI2016 区间 【线段树】

    题目 在数轴上有 n个闭区间 [l1,r1],[l2,r2],...,[ln,rn].现在要从中选出 m 个区间,使得这 m个区间共同包含至少一个位置.换句话说,就是使得存在一个 x,使得对于每一个被 ...

  6. Distinct Substrings(spoj 694)

    题意:要求不同子串的个数 /* 先求出height数组,不难看出height之和就是重复的字符串个数,用总的减去它就行了. */ #include<cstdio> #include< ...

  7. Linux System Programming 学习笔记(三) 标准缓冲I/O

    1. partial block operations are inefficient. The operating system has to “fix up” your I/O by ensuri ...

  8. SharePoint 2013 App 开发—SharePoint Hosted方式,

    这篇文章会依据简单的Demo,介绍一下SharePoint Hosted 方式开发App 的步骤和说明. 这种方式的环境相比较Office 365 要麻烦一些,如果不可以连接到Internet 或者还 ...

  9. Android系统默认输入法的修改为搜狗输入法

    1.  frameworks\base\packages\SettingsProvider\res\values\defaults.xml 文件中修改默认输入法为搜狗输入法 <stringnam ...

  10. 在Ubuntu / Ubuntu Kylin下安装和卸载 Nodepadqq

    在Ubuntu / Ubuntu Kylin下安装和卸载 Nodepadqq         对于Ubuntu发行版本可以通过PPA安装,命令如下: sudo add-apt-repository p ...