AlessandroLovo / RemoteJupyter

Utility to run a Jupyter notebook/lab over ssh
MIT License
4 stars 0 forks source link

RemoteJupyter

Utility to run a Jupyter notebook/lab over ssh

Installation (Linux and macOS)

  1. Download/clone the repository and open a terminal in the folder
  2. Run source setup_local.sh [-a <alias> (default jnr)]
  3. Run source setup_remote.sh [user@]host
  4. You will be ssh connected to your host and you will find the file jnr_setup_remote.sh in your home directory. Run it with source jnr_setup_remote.sh [-l <jupyter-lab alias> (default jlr)] [-n <jupyter-notebook alias> (default jnr)] which will setup the aliases to run jupyter notebook and lab remotely

Usage (local machine)

Assuming your alias for RemoteJupyter is jnr (default),

General Workflow

  1. (local machine): spawn a new process as shown above on a given port, let's say the default one 8888
  2. The terminal automatically moves to the remote machine
  3. (remote machine): start a jupyter notebook or lab with the aliases you set up when configuring RemoteJupyter on the remote machine for example with jlr 8888 which launches a jupyter lab on port 8888"
  4. (remote machine): copy the url that contains 'localhost'
  5. (local machine): open a browser and paste the url
  6. ...Do your work...
  7. (remote machine): Stop the notebook/lab by double tapping ctrl-c
  8. optional (remote machine): exit
  9. (local machine): kill the port forwarding process as shown above