make: bump version to rc4
[platform/upstream/caffeonacl.git] / docker / README.md
1 ### Running an official image
2
3 You can run one of the automatic [builds](https://hub.docker.com/r/bvlc/caffe). E.g. for the CPU version:
4
5 `docker run -ti bvlc/caffe:cpu caffe --version`
6
7 or for GPU support (You need a CUDA 8.0 capable driver and
8 [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)):
9
10 `nvidia-docker run -ti bvlc/caffe:gpu caffe --version`
11
12 You might see an error about libdc1394, ignore it.
13
14 ### Docker run options
15
16 By default caffe runs as root, thus any output files, e.g. snapshots, will be owned
17 by root. It also runs by default in a container-private folder.
18
19 You can change this using flags, like user (-u), current directory, and volumes (-w and -v).
20 E.g. this behaves like the usual caffe executable:
21
22 `docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) bvlc/caffe:cpu caffe train --solver=example_solver.prototxt`
23
24 Containers can also be used interactively, specifying e.g. `bash` or `ipython`
25 instead of `caffe`.
26
27 ```
28 docker run -ti bvlc/caffe:cpu ipython
29 import caffe
30 ...
31 ```
32
33 The caffe build requirements are included in the container, so this can be used to
34 build and run custom versions of caffe. Also, `caffe/python` is in PATH, so python
35 utilities can be used directly, e.g. `draw_net.py`, `classify.py`, or `detect.py`.
36
37 ### Building images yourself
38
39 Examples:
40
41 `docker build -t caffe:cpu cpu`
42
43 `docker build -t caffe:gpu gpu`
44
45 You can also build Caffe and run the tests in the image:
46
47 `docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"`