How to Use Jupyter Lab Remotely

I have a desktop at home with an Nvidia GPU that can be used with PyTorch. Sometimes, I work on projects and toys in Jupyter Lab remotely from my laptop. I found an easy way to do so below. This isn’t terribly secure, as it allows anyone to connect to Jupyter Lab from that interface. I recommend you only do this on a trusted internal network.

ssh <username>@<remote IP address>
jupyter-lab --ip=<remote computer IP address>
# Pressing "ctrl+a, d"  detaches from the screen

Another handy trick is to use sshfs to make remote files easily accessible on your system.

mkdir /tmp/remotemnt
sshfs <username>@<remote IP addr>:<remote mount point> /tmp/remotemnt

Your remote files are then accessible from /tmp/remotemnt, and can be unmounted just like any mounted drive.

umount /tmp/remotemnt
Categorized as Tech

Leave a comment

Your email address will not be published.