I\'m new to Tensorflow and would greatly benefit from some visualizations of what I\'m doing. I understand that Tensorboard is a useful visualization tool, but how do I run
For anyone who must use the ssh keys (for a corporate server).
Just add -i /.ssh/id_rsa
at the end.
$ ssh -N -f -L localhost:8211:localhost:6007 myname@servername -i /.ssh/id_rsa
--bind_all
option is useful.
$ tensorboard --logdir runs --bind_all
The port will be automatically selected from 6006 incrementally.(6006, 6007, 6008... )
Another approach is to use a reverse proxy, which allows you to view Tensorboard from any internet connected device without SSHing. This approach can make it far easier / tractable to view Tensorboard on mobile devices, for example.
Steps:
1) Download reverse proxy Ngrok on your remote machine hosting Tensorboard. See https://ngrok.com/download for instructions (~5 minute setup).
2) Run ngrok http 6006
(assuming you're hosting Tensorboard on port 6006)
3) Save the URL that ngrok outputs:
4) Enter that into any browser to view TensorBoard:
Special thanks to Sam Kirkiles
"whats my ip"
or entering this command: wget http://ipinfo.io/ip -qO -
wget http://ipinfo.io/ip -qO -
again from there too.6006
123.123.12.32:6006
If your remote server is open to traffic from your local IP address, you should be able to see your remote Tensorboard.
Warning: if all internet traffic can access your system (if you haven't specified a single IP address that can access it), anyone may be able to view your TensorBoard results and runaway with creating SkyNet themselves.
You don't need to do anything fancy. Just run:
tensorboard --host 0.0.0.0 <other args here>
and connect with your server url and port. The --host 0.0.0.0
tells tensorflow to listen from connections on all IPv4 addresses on the local machine.
Here is what I do to avoid the issues of making the remote server accept your local external IP:
-L
to transfer the port 6006
of the remote server into the port 16006
of my machine (for instance):
ssh -L 16006:127.0.0.1:6006 olivier@my_server_ip
What it does is that everything on the port 6006
of the server (in 127.0.0.1:6006
) will be forwarded to my machine on the port 16006
.
tensorboard --logdir log
with the default 6006
port