How to visualize http://localhost: files on a cluster?

293 views
Skip to first unread message

Jon Gleur

unread,
Mar 12, 2021, 2:12:55 PM3/12/21
to majiq_voila

I used the command
$ voila view output/
on a linux computing cluster and produced a serving link:
"Serving on http://localhost:xxxxx"

I was wondering how to visualize or download the content.
I tried to copy the link in a browser on a local computer but it didn't work.

Paul Jewell

unread,
Mar 15, 2021, 7:56:14 PM3/15/21
to majiq_voila
Hi Jon, 

This is always possible, but it depends on your HPC administrator and their policies how difficult/tedious it will be. 

Basically, In general, from a machine, you may run voila as a public web server, which will allow external connections, like this:

voila view --host 0.0.0.0 --port 30000

Now, if your HPC administrator allows inbound connections to the machine you are running voila on, on port 30000, you can just go to your web browser on your laptop, and type http://<ip_address_of_compute_machine>:30000 and you will see voila. 

If unprotected access is undesirable, you may also run voila view with the --enable-passcode option, which will only allow users to connect with a specific, random hash passcode provided. 

Now for example, suppose that port 30000 is blocked on that machine, then you can use an 'ssh tunnel' to basically forward the port 30000 traffic through the presumably open SSH port. Open a separate terminal and do something like:

$ ssh -L 30000:localhost:30000 user@server 

The window should open and log in, just leave it open, then go to your browser, and type in the address bar, http://localhost:30000 , and you should get access to voila this way. 

In more difficult cases, you may have to open multiple ssh tunnels, if you need to go through multiple machines to get to the one where you are actually running voila. It's usually always possible, but may be tedious. 

An alternative solution would be to mount the remote file system with something like sshfs, and run voila view locally, or simply copy the files to your laptop and run voila locally that way. 

Hopefully, this is helpful. 

Thanks, 
-Paul
Reply all
Reply to author
Forward
0 new messages