This component lets you launch a JupyterLite instance, which provides a way to serve Jupyter Notebooks completely in the browser.
JupyterLite runs completely in the browser but JupyterLab needs a server to launch and run.
At this moment not all the usual features available in JupyterLab and the Classic Notebook will work with JupyterLite, but many already do!
To learn more about JupyterLite please visit the official JupyterLite documentation.
Use these instructions to install:
lightning install component lightning/jupyterlite
git clone https://github.com/Lightning-AI/LAI-jupyterlite-Component.git
cd LAI-jupyterlite-Component
pip install -r requirements.txt
pip install -e .
To launch a Jupyter Lite instance in your app, you need to create an object of JupyterLite
class and call the run
method in the flow.
import lightning as L
from lai_jupyterlite import JupyterLite
class YourApp(L.LightningFlow):
def __init__(self):
super().__init__()
self.jupyter_lite = JupyterLite()
def run(self):
self.jupyter_lite.run()
app = L.LightningApp(YourApp())