Install visdom on your local system and remote server.
pip3 install visdom
On remote server, do:
ssh -N -f -L localhost:8097:localhost:8097 username@localsystemip
Set the same port in your python plotting script which you used in the port forwarding step above (8097
here).
Plotting script example [demo.py
]:
import visdom
import numpy as np
cfg = {"server": "localhost",
"port": 8097}
vis = visdom.Visdom('http://' + cfg["server"], port = cfg["port"])
vis.text('Hello Visdom!')
image = np.random.randint(0, 255, (3, 256, 256), dtype=np.uint8)
vis.image(image)
Run plotting script on remote server.
no_proxy=localhost python3 demo.py
Note for Ada: As of now, visdom only works if you have your proxy unset on Ada server. Either unset proxy with
export http_proxy=
or useno_proxy=localhost
before your python command.
Run visdom server on local machine.
visdom
View your plots locally at http://localhost:8097
.
@shruthi0898 Looks like your ssh key is missing but still I think you should be able to run the command by using your system password (see this). I guess you didn't post the complete log here. If you want, you can properly setup ssh keys by following this tutorial.
To be able to run the command given in the gist, you should be able to ssh into your local system (where you are running browser for visdom) from remote server NOT vice-versa. If you are not able to do so, you may try the following:
visdom -port 8998
ssh -N -f -L localhost:8998:localhost:8998 remote_username@remote_machine_ip
http://localhost:8998
on your local machine for visdom.