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
.
Hello, when I run the command: ssh -N -f -L localhost:8097:localhost:8097 username@localipaddress -v
I get the following:
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.130.176.192 [10.130.176.192] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/shri/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
Can you please help?