Skip to content

JupyterHub

Part of the lakehouse (overview and interaction diagram).

The JupyterHub template (Data science category) gives every user their own JupyterLab server, with a personal persistent volume and sign-in through the platform account. Whoever deploys the instance becomes its administrator (/hub/admin).

Field Role
Notebook image, Image version Jupyter image of user servers (ds/jupyter-datastack by default: JupyterLab + Spark Connect, PyIceberg, Trino and MLflow clients).
Max CPU per user, Max memory per user (Capacity tab) 2 cores and 4 Gi by default, per user server.
Storage per user (Capacity tab) 10Gi by default. Personal volume created at each user's first start. Fixed at creation: resizing existing user volumes is not done from this interface.
Apache Iceberg catalog, Trino, Spark Connect, MLflow (Lakehouse tab, optional) Instances of the same namespace to pre-wire into notebooks (environment variables).
Iceberg catalog (warehouse) (Lakehouse tab) Catalog name on the Polaris side, lakehouse by default (POLARIS_WAREHOUSE).
S3 bucket (Storage tab, optional) S3 keys exposed to notebooks (AWS_*).
S3 endpoint, S3 region, Access Key ID, Secret Access Key (Storage tab) Filled in by the bucket picker, editable afterwards — type them in for an external S3.

Variables available in every notebook when the corresponding service is set:

Variable Content
POLARIS_URI, POLARIS_WAREHOUSE, POLARIS_CREDENTIAL, POLARIS_SCOPE Iceberg REST catalog and clientId:clientSecret credentials
TRINO_HOST Trino coordinator (name:8080, namespace-internal access)
SPARK_REMOTE, MLFLOW_TRACKING_URI Spark Connect and MLflow (if deployed)
AWS_ENDPOINT_URL, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY S3 access to the warehouse

Example with PyIceberg:

import os
from pyiceberg.catalog.rest import RestCatalog

catalog = RestCatalog(
    "lakehouse",
    uri=os.environ["POLARIS_URI"],
    warehouse=os.environ["POLARIS_WAREHOUSE"],
    credential=os.environ["POLARIS_CREDENTIAL"],
    scope=os.environ["POLARIS_SCOPE"],
    **{"s3.endpoint": os.environ["AWS_ENDPOINT_URL"],
       "s3.access-key-id": os.environ["AWS_ACCESS_KEY_ID"],
       "s3.secret-access-key": os.environ["AWS_SECRET_ACCESS_KEY"]},
)
print(catalog.list_namespaces())

One JupyterHub instance per namespace

The chart supports a single JupyterHub per namespace; a second deployment is refused with an explicit message. User servers idle for one hour are stopped automatically (the personal volume is kept).

Deletion

Deleting a JupyterHub instance also removes its OpenID client from the platform.