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. Codeforces Round #345 (Div. 2)——B. Beautiful Paintings(贪心求上升序列个数)

    B. Beautiful Paintings time limit per test 1 second memory limit per test 256 megabytes input standa ...

  2. 《如何成为一位大家愿意追随的Leader》读后感

    今天看了左耳朵耗子老师的文章<如何成为一位大家愿意追随的Leader>深有感触.每一行字都往心里说,文章里说到Leader和Boss的不同点在于,Leader是大家跟我一起上,而Boss则 ...

  3. [BZOJ2045]双亲数(莫比乌斯反演)

    双亲数 Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 959  Solved: 455[Submit][Status][Discuss] Descri ...

  4. 2016 Multi-University Training Contest 10 solutions BY BUPT

    1001. 一个数组上的两个区间求中位数,可以通过分类讨论直接找到中位数,复杂度O(1).不过本题数据较小,优美的log(n)也可过. 1002. 直接求得阴影面积表达式即可. 1003. 二分完成时 ...

  5. 洛谷 [P1948] 电话线

    二分答案 首先,最大值最小,就是二分答案 #include <iostream> #include <cstdio> #include <algorithm> #i ...

  6. SharePoint 2013 App 开发—Auto Hosted 方式

    Auto Hosted 方式,自动使用Windows Azure来作为host,这种模式将App 发布到Office 365上的SharePoint Developer Site上.这种方式可以不用花 ...

  7. Pόlya定理-学习笔记

    gi为一个为一个置换 c(g),为c(g)的轮换的数量 (循环的数量) 太监了

  8. IC 拔取器 rework station

  9. ajax 分页(jquery分页插件pagination) 小例2

    封装成:myPagination.js// ajax分页 function sendAjax(flag, dataParam, url, callback) {//封装的ajax: var shus ...

  10. [simple-orm-mybaits]基于Mybatis的ORM封装介绍

    目录 前言 ORM框架现状 Mybatis优缺点 simple-orm-mybatis设计思路介绍 simple-orm-mybatis使用说明 simple-orm-mybatis实际使用 推荐最佳 ...