jupyter / nb2kg

Other
73 stars 31 forks source link

whitelisting of kernels #27

Closed Gsbreddy closed 5 years ago

Gsbreddy commented 5 years ago

I am using nb2kg with EG and in the kernelspecs I can see both python3 and spark-python-yarn-mode. But When I dont want to see python3 kernel. I found that in notebook conf a similar config exists as follows #Removing default python kernel c.KernelSpecManager.ensure_native_kernel = False c.KernelSpecManager.whitelist = {'spark_python_yarn_cluster'}

But this isnt working with nb2kg since its overriding the kernelspecmanager. Any ideas on this?

kevin-bates commented 5 years ago

When nb2kg is configured kernel management (and kernelspecs) are performed (and derived) from the gateway (EG) server. As a result, this should be configured in the gateway configuration.

Gsbreddy commented 5 years ago

Is there some config in EG? I couldn’t find any in the docs.

kevin-bates commented 5 years ago

EG is usually started from a script since its more like a service, but it can also be configured like the other jupyter applications.

[elyra@elyra-omg-node-1 ~]$ jupyter enterprisegateway --generate-config
Overwrite /home/elyra/.jupyter/jupyter_enterprise_gateway_config.py with default config? [y/N]y
Writing default config to: /home/elyra/.jupyter/jupyter_enterprise_gateway_config.py
Gsbreddy commented 5 years ago

But in case of Bare metal machines it has no env called EG_KERNEL_WHITELIST.

kevin-bates commented 5 years ago

True. We use the env to convey into the container. However, the actual configurable item is the same as Notebook since it's all inherited.

Gsbreddy commented 5 years ago

Ok let me try this out. Thanks 🙂

Gsbreddy commented 5 years ago

It's working thanks.