Skip to content

Integrating Posit Workbench with Jupyter Notebooks, Launcher, and Kubernetes#

Overview#

These steps describe how to integrate Posit Workbench, formerly RStudio Workbench, with Jupyter Notebooks running with Launcher and Kubernetes.

The most recent rstudio/r-session-complete Docker images referenced in these steps include Python and Jupyter.

Info

Launcher is a new feature of RStudio Server Pro 1.21 that is only available under named user licensing. RStudio Server Pro 1.2 without Launcher is available under existing server-based licensing.

For questions about using Launcher with Workbench, please contact sales@rstudio.com.

Prerequisites#

This integration is intended to be performed on top of an installation of Workbench that has already been configured with Launcher and Kubernetes.

Step 1. Configure Launcher with Jupyter Notebooks#

  • Add the following lines to the Launcher Jupyter configuration file:

    File: /etc/rstudio/jupyter.conf
    jupyter-exe=/opt/python/3.7.13/bin/jupyter
    notebooks-enabled=1
    labs-enabled=1
    default-session-cluster=Kubernetes
    default-session-container-image=rstudio/r-session-complete:centos7-2022.07.2-576.pro12
    

Step 2. Restart Workbench and Launcher Services#

  • Restart the services:

    Terminal
    $ sudo rstudio-server restart
    $ sudo rstudio-launcher restart
    

Step 3. Test Workbench with Launcher and Jupyter Notebooks#

  • From your browser, navigate to the Workbench interface and log in.
  • Select New Session and do the following:
  1. Give your session a name.
  2. In the **Editor** field, select either Jupyter Notebooks or JupyterLab as the IDE.
  3. Click Start Session.

A screenshot of the Jupyter Notebook Local Plugin UI that displays the New Session configuration panel and the new session's Editor configured using the Jupyter Notebook option.

Now, you can use the Jupyter Notebooks or JupyterLab interfaces.

Important

Some local Jupyter configurations may prevent the JupyterLab session from correctly launching in Workbench. For example, setting a password in the files ~/.jupyter/jupyter-server-config.json or ~/jupyter/jupyter-server-config.py, will cause the JupyterLab session to start but not load through the Workbench interface. Commenting out the configuration in question is sufficient to restore expected functionality.

(Optional) Configure multiple Python versions or environments#

The Python integration steps described above result in a single Python environment that contains both core packages for Jupyter Notebooks as well as Python packages for end users.

While this is a simple approach, this setup can result in issues if end users want to use different versions of the same package or if some packages conflict with core packages for Jupyter Notebooks.

If you would like to use multiple versions of Python or different Python environments, or if you want to install Jupyter Notebook in a separate environment from Python packages for end users, then you can refer to the documentation for using multiple Python versions and environments with Jupyter.

Troubleshooting Workbench and Jupyter#

Refer to the support article on troubleshooting Jupyter Notebooks in Workbench for additional information on troubleshooting Workbench with Jupyter.

Additional Documentation#

For more information on Workbench and Launcher, refer to the following reference documentation:


  1. We will continue to use the RStudio Server Pro name for references to versions prior to 1.4.