提交 c842c587 编写于 作者: D Dongjoon Hyun

TensorFlow: Add a port mapping option for docker command.

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
上级 17b095cd
......@@ -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
......@@ -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.
......
......@@ -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 "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册