JupyterLab installation on server - UTMediaCAT/mediacat-docs GitHub Wiki

JupyterLab installation on server

Note:

The following should be performed on a Compute Canada instance not your local machine

  • Prerequisites:
    • need to have virtualenv, source, python3, pip
  • For the follwing replace [path] with the path that you want to place JupyterLab. In the past it was /media/data
  • Create new Python virtual environment
    • virtualenv --no-download [path]/jupyter_lab
  • Activate your newly created Python virtual environment
    • source [path]/jupyter_lab/bin/activate
  • Install JupyterLab in your new virtual environment
    • pip install --no-index –-upgrade pip
    • pip install --no-index jupyterlab
  • Create a script that launches JupyterLab
    • echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter-lab --ip $(hostname -f) --no-browser --allow-root' > $VIRTUAL_ENV/bin/jupyterlab.sh
  • Next make that script executable
    • chmod u+x $VIRTUAL_ENV/bin/jupyterlab.sh
  • Start JupyterLab

Notes

  • See this documentation for more information
  • Please update the docs if this process changes