From: Cyprien Noel Date: Wed, 8 Feb 2017 19:42:05 +0000 (-0800) Subject: Document switch to explicit flags for docker: cpu / gpu. X-Git-Tag: submit/tizen/20180823.020014~87 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=734702b3703de0368e901644125ddca91bab4cb7;p=platform%2Fupstream%2Fcaffeonacl.git Document switch to explicit flags for docker: cpu / gpu. --- diff --git a/docker/README.md b/docker/README.md index 11c1815..f9c7c75 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,9 +1,8 @@ ### Running an official image -You can run one of the automatic [builds](https://hub.docker.com/r/bvlc/caffe) -like this: +You can run one of the automatic [builds](https://hub.docker.com/r/bvlc/caffe). E.g. for the CPU version: -`docker run -ti bvlc/caffe caffe --version` +`docker run -ti bvlc/caffe:cpu caffe --version` or for GPU support (You need a CUDA 8.0 capable driver and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)): @@ -20,13 +19,13 @@ 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 caffe train --solver=example_solver.prototxt` +`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 ipython +docker run -ti bvlc/caffe:cpu ipython import caffe ... ``` @@ -39,10 +38,10 @@ utilities can be used directly, e.g. `draw_net.py`, `classify.py`, or `detect.py Examples: -`docker build -t caffe cpu` +`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 bash -c "cd /opt/caffe/build; make runtest"` +`docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"`