jupyter-server / enterprise_gateway

A lightweight, multi-tenant, scalable and secure gateway that enables Jupyter Notebooks to share resources across distributed clusters such as Apache Spark, Kubernetes and others.
https://jupyter-enterprise-gateway.readthedocs.io/en/latest/
Other
615 stars 221 forks source link

Flow kernel-class-name to kernel container if specified in kernel specification #1187

Closed kevin-bates closed 1 year ago

kevin-bates commented 1 year ago

This pull request updates the container-based launchers (kubernetes, docker) and the bootstrap-kernel.sh script used in the kernel images to recognize and flow --kernel-class-name values to the python launcher.

When set, python-based kernel containers will have a KERNEL_CLASS_NAME env value corresponding to the configured kernel class that is set in the kernel.json via --kernel-class-name.

Since our kernelspecs don't set this value, a good way to test is to exec into the EG pod/container and add

    "--kernel-class-name",
    "ipykernel.ipkernel.IPythonKernel"

to the argv stanza, then confirm the environment values from within the launcher kernel.

Resolves #1184