I have installed tensorflow on windows through docker toolbox. Everything goes well except I can't use tensorboard. The command line shows 'Starting Tensorboard 29 on port 6006. You can navigate to http://localhost:6006/'.However, when I opened this address on my webbrowser, it just can not connect to it. Does anyone know how to solve this problem?
How to use TensorBoard in a Docker container (on Windows)
26.4k Views Asked by Zhetao Zhuang AtThere are 4 best solutions below
On
Maybe you should map your volumes to the folder with the logs and enter with bash well:
docker run -v //c/pathto/tf_logs:/tf_logs
-p 0.0.0.0:6006:6006 -p 8888:8888 -it b.gcr.io/tensorflow/tensorflow bash
cd ..
tensorboard --logdir tf_logs/
hit the mapping in your browser
On
On Windows 10 + WSL2 + Docker using the offical tensorflow/tensorflow:latest-gpu-py3-jupyter image, I had to tell TB to bind to the wildcard address. That is, in the Jupyter notebook, I called:
%tensorboard --logdir logs/ --host 0.0.0.0
After this, I was able to see the embedded dashboard in my notebook.
On
I'd like to update the answer here, since I just ran into the same problem on Ubuntu 20.04 and the latest-gpu tensorflow docker image (03e706e09b04).
What worked for me was the following docker run:
docker run -p 8888:8888 -p 6006:6006 --rm -v <path_to_logdir>:/logdir tensorflow/tensorflow tensorboard --logdir /logdir --bind_all
The server is then accessible at localhost:6006 as one would expect.
The main difference here is, I guess, adding the --bind_all flag to the tensorboard call which exposes the server to external networks, thus allowing the host machine access.

If you're running TensorBoard inside a Docker container, and trying to use a web browser in Windows to view it, you will need to set up port forwarding from the container to your Windows machine. See this answer for a longer discussion about port forwarding for TensorBoard, but you should be able to make progress by using the following command:
However, it may be easier to install TensorFlow directly on Windows, and run TensorBoard there. If you install Python 3.5 for Windows, you can install TensorFlow and TensorBoard by running:
You can then run TensorBoard directly from the command prompt, and you will not need to worry about port forwarding. See the Windows installation instructions for more details.