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
/usr/bin/python3 -m pip install -U jupyterlab nbconvert jupytext \
                                   git+https://github.com/kdm9/[email protected] \
                                   git+https://github.com/kdm9/[email protected]
/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 0.0.0.0 --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 0.0.0.0 in the jupyter lab command above, and always use SSH forwarding. One would then use ssh -N -L YOUR_PORT:localhost:YOUR_PORT [email protected] (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.