You actually don’t even need the plotly jupyterlab extension. That is only for older versions of jupyterlab. The current one on most (if not all) renku deployments is new enough to not require the extension.
If your project is very old though please do the migration through the renku UI. You can find information about whether your project needs a migration under Overview → Status.
If your project has jupyterlab 2.x then you need to add the following line in your dockerfile, in addition to the steps below. The line should be added right after the part that uses the
environment.yaml files to install your python packages.
RUN jupyter labextension install firstname.lastname@example.org @jupyter-widgets/jupyterlab-manager
See this example project: Renku
All I had to do is add the following in the my
Commit this change, push, let the image rebuild and when you launch a session with this new image you will be able to plot things in a notebook just like this:
import plotly.graph_objects as go
fig = go.Figure(data=go.Bar(y=[2, 3, 1]))