Skip to content

Commit cfa2c0c

Browse files
committed
fix flags in BVLC#3518 for nvidia-docker
nvidia-docker requires long args with equal sign as of docker 1.10: see BVLC#3518 (comment)
1 parent 59d099c commit cfa2c0c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docker/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"
2828

2929
In order to get the most out of the caffe image, some more advanced `docker run` options could be used. For example, running:
3030
```
31-
docker run -ti --volume $(pwd):/workspace caffe:cpu caffe train --solver=example_solver.prototxt
31+
docker run -ti --volume=$(pwd):/workspace caffe:cpu caffe train --solver=example_solver.prototxt
3232
```
33-
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).
33+
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).
3434

3535
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:
3636
```
37-
docker run -ti --volume $(pwd):/workspace -u $(id -u):$(id -g) caffe:cpu caffe train --solver=example_solver.prototxt
37+
docker run -ti --volume=$(pwd):/workspace -u $(id -u):$(id -g) caffe:cpu caffe train --solver=example_solver.prototxt
3838
```
39-
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.
39+
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.
4040

4141
# Other use-cases
4242

examples/mnist/train_lenet_docker.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fi
8585
# /workspace
8686
# --workdir /workspace Ensures that the docker container starts in the right
8787
# working directory
88-
DOCKER_OPTIONS="--rm -ti -u $CUID:$CGID --volume $(pwd):/workspace --workdir /workspace"
88+
DOCKER_OPTIONS="--rm -ti -u $CUID:$CGID --volume=$(pwd):/workspace --workdir=/workspace"
8989
DOCKER_RUN="$DOCKER_CMD run $DOCKER_OPTIONS $IMAGE"
9090

9191
# Download the data

0 commit comments

Comments
 (0)