A Lightning component to Launch Jupyter Lab
Jupyter Lab
JupyterLab is the latest web-based interactive development environment for notebooks, code, and data. Its flexible interface allows users to configure and arrange workflows in data science, scientific computing, computational journalism, and machine learning. This component allows you to create LightningWork with Jupyter Lab. This components support the following jupyter kernels (Python 3.8, R 3,6 and Julia 1.7).
Usage
To use this component add modify the following variables below. Please consider checking out our documentation to understand they types of Cloud Compute instances supported. Startup time for this component with all kernels is around 5-6 minutes.
from lai_jupyter import JupyterLab
import lightning as L
import os
class RootFlow(L.LightningFlow):
def __init__(self) -> None:
super().__init__()
self.jupyter_work = JupyterLab(kernel=os.getenv("LIGHTNING_JUPYTER_LAB_KERNEL", "python"),
cloud_compute=L.CloudCompute(
os.getenv("LIGHTNING_JUPYTER_LAB_COMPUTE", "cpu-small")))
def run(self):
self.jupyter_work.run()
def configure_layout(self):
return {'name': "JupyterLab", 'content': self.jupyter_work}
app = L.LightningApp(RootFlow())
By default this component launches with cpu-small Compute Instance and python Kernel. This can be overridden using the LIGHTNING_JUPYTER_LAB_COMPUTE and LIGHTNING_JUPYTER_LAB_KERNEL environment variable.
lightning run app demo_app.py --cloud
lightning run app demo_app.py --cloud --env LIGHTNING_JUPYTER_LAB_COMPUTE=gpu
lightning run app demo_app.py --cloud --env LIGHTNING_JUPYTER_LAB_COMPUTE=gpu --env LIGHTNING_JUPYTER_LAB_KERNEL="python|r|julia"
Installation
Use these instructions to install:
lightning install component lightning/LAI-Jupyter-Component
Or use it with pip
> cat requirements.txt
git+https://github.com/Lightning-AI/LAI-Jupyter-Component
Or to build locally
git clone https://github.com/Lightning-AI/LAI-Jupyter-Component
cd LAI-Jupyter-Component
pip install .
Tests
To run the test locally:
# From the root of this package
pip install -r tests/requirements.txt
pytest
Metadata
Release files for lightning-jupyter 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lightning-jupyter-0.0.2.tar.gz | 7.6 kB | Without provenance | Details for lightning-jupyter-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lightning_jupyter-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for lightning_jupyter-0.0.2-py3-none-any.whl |
Total release size: 15.6 kB
Release files / lightning-jupyter-0.0.2.tar.gz
| Download URL | lightning-jupyter-0.0.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba675410c189dc47fc436771158e2465ddc2d97736805dc85a0a15d2292e64ce
|
|
BLAKE2b-256 checksum How to use checksums |
c7cbd0bb2a2d5853b9196f31dba3cdcae0ce569e830a4b9c3135c1c550fb9a87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / lightning_jupyter-0.0.2-py3-none-any.whl
| Download URL | lightning_jupyter-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec6fc6ba993dd800491c715ac53868ce64e1d6c68167ea1b071ce45e2a67d4ef
|
|
BLAKE2b-256 checksum How to use checksums |
a85a9cf3a9670271536c4e5e0e2d704c832e28703095ae7ccc64e9f4b8b9a623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.11.3 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for lightning-jupyter 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.