Using my own laptop to run Tensorflow on remote server of lab
I used tensorboard --logdir=./log
try to view curves of the running results
I got:
Starting TensorBoard on port 6006
(You can navigate to http://0.0.0.0:6006)
and then I tried to connect it in the browser, but it failed...
anyone know how to configure in order to view tensorboard of remote server on my own laptop?
Connect to the server by transferring port 6006 of the remote server into a port you like to view the Tensorboard (like 16006).
You can visualize the model graph, losses, accuracy, etc when your model is under training. It is a very helpful tool that can be used to monitor the model that is getting trained on a large dataset. You can use Tensorboard not only with TensorFlow but also with Keras.
where the -p 6006 is the default port of TensorBoard.
If you start the tensorboard server on your lab instance using the command you mentioned, it will be running on the lab server and hosting the tensorboard webpage from labserverIP:6006.
I use a cluster running SLURM (which manages everyone's job submissions) and am able to start the tensorboard server on cluster node and then SSH into the specific node running the tensorboard server and essentially forward the site from from the labserverIP:6006 to my laptop at localhost:6006. My script on github here shows the commands I use to do this for SLURM. Essentially it is these three steps:
1) Start the remote server and run tensorboard --logdir=./log --host $SERVER_IP --port $SERVER_PORT
2) SSH from your laptop using ssh [email protected] -L $LOCAL_PORT:$SERVER_IP:$SERVER_PORT
You can replace [email protected] with the server public IP.
3) Got to http://localhost:$LOCAL_PORT
in your laptop's browser to access the tensorboard page.
The other option is to copy all of the log files to your local machine or a shared drive and then start tensorboard on your laptop with the local or shared directory as your logdir.
This is how I can forward a port at remote server to my local home computer
ssh -NfL 6006:localhost:6006 username@remote_server_address
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With