A quick-start list of commands for a fully-configured Jupyterlab user install that supports bash, R, and python.

Run these commands on the server which you would like to set JupyterLab up on. Make it a nice big one where your data lives, not a server specific to Jupyterlab. For WeigelWorld folks: that would be taco or chimi, not changa.

/usr/bin/python3 -m pip install -U pip
# Update 2022-10-21: dependencies now updated, just install from PyPI. :)
/usr/bin/python3 -m pip install -U jupyterlab nbconvert jupytext bash_kernel papermill
/usr/bin/python3 -m bash_kernel.install
Rscript -e 'install.packages("IRkernel"); IRkernel::installspec()'
jupyter server password # enter a NEW password here
tmux new-session jupyter lab --ip --port YOUR_PORT --no-browser

Then you should be all set up. Go to your server’s address (like http://chimi.eb.local:YOUR_PORT) in a modern browser (Firefox/Chromium/Safari). It will probably ask for your password, which should be the one you set with jupyter server password, NOT your normal password for that server.

Some notes:

  • Above, we install some packages from my GitHub, as the upstream versions have either bugs or are missing certain features we need. Hopefully upstream will soon merge these PRs, and then we can just revert to installing the packages themselves.
  • You should pick a unique port number (between 1025 and 65000), which you will need to remember (or bookmark). Replace YOUR_PORT with your actual port number in the commands above and below.
  • We run Jupyterlab within tmux so that it will persist past the current ssh connection and we still can easily see its output. If you don’t know or want tmux, you could use screen or even nohup to get Jupyterlab to persist.
  • A more secure alternative is to omit --ip in the jupyter lab command above, and always use SSH forwarding. One would then use ssh -N -L YOUR_PORT:localhost:YOUR_PORT ldap_id@chimi.eb.local (obviously replace that with your username and server). Then go to http://localhost:YOUR_PORT, rather than the server URL above. autossh would be useful here.