[INTERIM-DEV] Remote Kernel Provider Development
Pre-releaseThis "release" exists to provide instructions and pre-built dependency files that are required for the initial development of remote kernel providers. Once dependencies are officially available, this release will be removed. For the most part, because most dependencies are now available via PyPi, the contents of this release are waning.
On-prem (non-container) Setup for YARN
To setup an on-prem environment for YARN, follow these steps. Note: Use of a virtual env is highly recommended.
- Download the
Notebook
whl file attached to this release andpip install
it into a development environment or build/install this fork and branch. This should also installjupyter_kernel_mgmt >= 0.4.0
andtornado == 5.1.1
. - Install YarnKernelProvider:
pip install yarn_kernel_provider
. This should also installremote_kernel_provider >= 0.1.0
(andjupyter_kernel_mgmt >= 0.4.0
if performed before previous step). - Replace any wheel files with your own dev versions and install those using
pip install --upgrade
. - Using
juptyer yarn-kernelspec install
, create desired kernel specifications. - Make any necessary edits to the kernelspec files relative to your environment.
- Download
on-prem-start-notebook.sh
. Make any necessary edits relative to your environment. - Run
on-prem-start-notebook.sh
. You might want some notebooks in the same directory or use the notebook dir option to point to a different location.
These steps worked for me:
conda create -n py3-rkp python=3.6
conda activate py3-rkp
pip install notebook-6.0.0.dev0-py2.py3-none-any.whl
pip install yarn_kernel_provider
jupyter yarn-kernelspec install
jupyter yarn-kernelspec install --language=R
jupyter yarn-kernelspec install --language=Scala
on-prem-start-notebook.sh
After which you should have three kernelspecs located in /usr/local/share/juptyer/kernels/yarnkp_spark_{python,r,scala}
. You may need to use various options to fine-tune to your environment. Please open an issue at https://github.com/gateway-experiments/yarn_kernel_provider should there be warranted changes or fixes.
Container-based Setup
These steps were used to create the Kubernetes environment. Setup for Docker{,Swarm} will vary:
- An image (
elyra/nb-kernel-mgmt:dev
) containing theNotebook
,juptyer_kernel_mgmt
,remote_kernel_provider
,kubernetes_kernel_provider
anddocker_kernel_provider
whl and kernelspec files can be found here. Note: This has not been tested in Docker or Docker Swarm but does appear to work for Kubernetes. - Should you need to modify the image, download the
Dockerfile
attached to this release. - I deployed the image on Kubernetes using the attached
notebook.yaml
file. This file is derived directly from the one used by Enterprise Gateway. As a result, there are a number of items in this file that do not apply to this configuration or require more work (e.g., whitelists are not applied, andkernel-image-puller
isn't able to access specs from Notebook, etc.)