Skip to content

Jupyter Lab

It is a new complete set of integrated development environment (IDE) which specifically designed for scientific research and rapid prototyping.

It has extensive ability in comparison of Spyder or Jupyter notebook alone. Also, there are many document and video tutorials that can be quickly viewed to learn how to use it.

Installation of package is very easy via conda (Anaconda).

Then from the following link, it is possible to have nice shortcut to run it.

https://stackoverflow.com/questions/51036132/running-jupyterlab-as-a-desktop-application-in-windows-10

For using it via ssh, someone can run JupyterLab on local browser while the server is remote and connection will be established by ssh. For doing so:

  • ssh in to remote server and run:
$ jupyter-lab --no-browser --port=1234
  • Then from some terminal (for example PowerShell) run:
$ ssh -CNL localhost:1234:localhost:1234 username@hostname
  • Then open localhost:1234 in the browser. For token, use the token which is given by jupyter-lab command output. When you first login to server, it is possible to assign a password. This password let the user login with password instead of token for the next times.
  • It is possible to assign an alias for remote bash or ~/.bashrc:
$ alias jlremote='jupyter-lab --no-browser --port=1234
  • If you want to make the server run persistent, then it is possible to run the JupyterLab server with tmux or screen or nohup:
$ nohup jupyter-lab --no-browser --port=1234

If you want to stop nohup process, it is possible to find the list of them:

$ ps xw

Then the processes which have “?” sign on TTY column, they are running with nohup. It is possible to stop them with “kill PID” command.

  • For local configuration for easy accessibility, Putty can be useful. If OpenSSH is installed in Windows, it is possible to connect via that but based on my experience Putty works better. Putty configuration is similar to a normal ssh configuration and the only difference is Tunnel part in ssh connection. In Tunnel configuration, it is needed to have remote port (e.g. 1234) and local host and port (e.g localhost:1234). Adding this Tunnel and saving the connection as an Shortcut in Windows make life much easier. Also, it is possible to add JupyterLab command to run JupyterLab server when the Putty shortcut is run.

Published inTools

Be First to Comment

Leave a Reply