Skip to content

Commit

Permalink
TensorFlow: Add a port mapping option for docker command.
Browse files Browse the repository at this point in the history
Changes:

* Add port mapping options to `docker run` commands in
  docker_run_gpu.sh and README.md. Docker on Mac needs an extra option
  `-p` to expose 8888 for Jupyter Notebook. The added option makes the
  behavior of containers consistent on both Ubuntu and Mac.

Change-Id: I29002329f08d7dc05415925e9b2aedbd3f112813
  • Loading branch information
dongjoon-hyun committed Dec 7, 2015
1 parent 17b095c commit c842c58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tensorflow/tools/docker/README.md
Expand Up @@ -31,7 +31,7 @@ We currently maintain three Docker container images:
Each of the containers is published to a Docker registry; for the non-GPU
containers, running is as simple as

$ docker run -it b.gcr.io/tensorflow/tensorflow
$ docker run -it -p 8888:8888 b.gcr.io/tensorflow/tensorflow

For the container with GPU support, we require the user to make the appropriate
NVidia libraries available on their system, as well as providing mappings so
Expand All @@ -40,7 +40,7 @@ accomplished via

$ export CUDA_SO=$(\ls /usr/lib/x86_64-linux-gnu/libcuda* | xargs -I{} echo '-v {}:{}')
$ export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
$ docker run -it $CUDA_SO $DEVICES b.gcr.io/tensorflow/tensorflow-devel-gpu
$ docker run -it -p 8888:8888 $CUDA_SO $DEVICES b.gcr.io/tensorflow/tensorflow-devel-gpu

Alternately, you can use the `docker_run_gpu.sh` script in this directory.

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/docker/docker_run_gpu.sh
Expand Up @@ -34,4 +34,4 @@ if [[ "${DEVICES}" = "" ]]; then
exit 1
fi

docker run -it $CUDA_SO $DEVICES b.gcr.io/tensorflow/tensorflow-full-gpu "$@"
docker run -it -p 8888:8888 $CUDA_SO $DEVICES b.gcr.io/tensorflow/tensorflow-full-gpu "$@"

0 comments on commit c842c58

Please sign in to comment.