Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Caffe is a deep learning framework. See the Caffe homepage for more info.

This was created for the elastic-thought project, which is a REST api wrapper around Caffe, but should be useful for anyone running Caffe.

There are CPU and GPU versions of this image:

This docker image is part of the following images generated from a single template:

Verify CPU Version:

$ cd /opt/caffe/data/mnist
$ ./
$ cd ../../examples/mnist
$ sed -i 's/solver_mode: GPU/solver_mode: CPU/' lenet_solver.prototxt
$ cd ../../
$ ./examples/mnist/
$ ./examples/mnist/

Expected output:

libdc1394 error: Failed to initialize libdc1394 
I1018 17:02:23.552733    66 caffe.cpp:90] Starting Optimization 
I1018 17:02:23.553583    66 solver.cpp:32] Initializing solver from parameters:
... lots of output ...
I1207 03:17:50.054651    57 solver.cpp:247] Iteration 10000, Testing net (#0)
I1207 03:17:55.369581    57 solver.cpp:298]     Test net output #0: accuracy = 0.9904
I1207 03:17:55.370614    57 solver.cpp:298]     Test net output #1: loss = 0.029635 (* 1 = 0.029635 loss)
I1018 17:17:58.684598    66 caffe.cpp:102] Optimization Done.

How to launch GPU instances:

  • You will to run on hardware that has the nvidia kernel module installed
  • You will need to pass in the nvidia devices in the docker run command

See Running Caffe on AWS GPU Instance via Docker for instructions.

Verify GPU Version:

$ cd /opt/caffe/data/mnist
$ ./
$ ./examples/mnist/
$ ./examples/mnist/


If you get the error "error while loading shared libraries: cannot open shared object file: No such file or directory", try running:

$ ldconfig


You can’t perform that action at this time.