summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2016-02-27 12:10:16 -0800
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2016-02-27 12:10:17 -0800
commitcfa2c0cf596a4e1157e651389601d05779f5d27d (patch)
tree105201059bb765974c28393f46d9ce64137be509
parent59d099cba692a53b5ae834d8d5f1cec164e3f8ec (diff)
downloadcaffe-cfa2c0cf596a4e1157e651389601d05779f5d27d.tar.gz
caffe-cfa2c0cf596a4e1157e651389601d05779f5d27d.tar.bz2
caffe-cfa2c0cf596a4e1157e651389601d05779f5d27d.zip
fix flags in #3518 for nvidia-docker
nvidia-docker requires long args with equal sign as of docker 1.10: see https://github.com/BVLC/caffe/pull/3518#issuecomment-189576419
-rw-r--r--docker/README.md8
-rwxr-xr-xexamples/mnist/train_lenet_docker.sh2
2 files changed, 5 insertions, 5 deletions
diff --git a/docker/README.md b/docker/README.md
index 0eb8c863..fdab641b 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -28,15 +28,15 @@ docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"
In order to get the most out of the caffe image, some more advanced `docker run` options could be used. For example, running:
```
-docker run -ti --volume $(pwd):/workspace caffe:cpu caffe train --solver=example_solver.prototxt
+docker run -ti --volume=$(pwd):/workspace caffe:cpu caffe train --solver=example_solver.prototxt
```
-will train a network defined in the `example_solver.prototxt` file in the current directory (`$(pwd)` is maped to the container volume `/workspace` using the `--volume` Docker flag).
+will train a network defined in the `example_solver.prototxt` file in the current directory (`$(pwd)` is maped to the container volume `/workspace` using the `--volume=` Docker flag).
Note that docker runs all commands as root by default, and thus any output files (e.g. snapshots) generated will be owned by the root user. In order to ensure that the current user is used instead, the following command can be used:
```
-docker run -ti --volume $(pwd):/workspace -u $(id -u):$(id -g) caffe:cpu caffe train --solver=example_solver.prototxt
+docker run -ti --volume=$(pwd):/workspace -u $(id -u):$(id -g) caffe:cpu caffe train --solver=example_solver.prototxt
```
-where the `-u` Docker command line option runs the commands in the container as the specified user, and the shell command `id` is used to determine the user and group ID of the current user. Note that the Caffe docker images have `/workspace` defined as the default working directory. This can be overridden using the `--workdir` Docker command line option.
+where the `-u` Docker command line option runs the commands in the container as the specified user, and the shell command `id` is used to determine the user and group ID of the current user. Note that the Caffe docker images have `/workspace` defined as the default working directory. This can be overridden using the `--workdir=` Docker command line option.
# Other use-cases
diff --git a/examples/mnist/train_lenet_docker.sh b/examples/mnist/train_lenet_docker.sh
index 049f0138..32cf1c8e 100755
--- a/examples/mnist/train_lenet_docker.sh
+++ b/examples/mnist/train_lenet_docker.sh
@@ -85,7 +85,7 @@ fi
# /workspace
# --workdir /workspace Ensures that the docker container starts in the right
# working directory
-DOCKER_OPTIONS="--rm -ti -u $CUID:$CGID --volume $(pwd):/workspace --workdir /workspace"
+DOCKER_OPTIONS="--rm -ti -u $CUID:$CGID --volume=$(pwd):/workspace --workdir=/workspace"
DOCKER_RUN="$DOCKER_CMD run $DOCKER_OPTIONS $IMAGE"
# Download the data