zoukankan      html  css  js  c++  java
  • docker--caffe

    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"

  • 相关阅读:
    Java实现连接FTP服务并传递文件
    消息队列(MQ)入门-activemq,rocketmq代码级别
    js分页功能实现
    记录几个遇到的问题和解决方法
    oracle 日志归档设置
    打印系统时间
    linux 定时任务
    linux 安装jdk
    db2 命令
    二维码、条形码扫描——使用Google ZXing
  • 原文地址:https://www.cnblogs.com/leoking01/p/7793806.html
Copyright © 2011-2022 走看看