Hi Amar - great questions. Yes, you should be able to accomplish both of these requests using Enterprise Gateway.
1. You could create different kernel specifications, one that is CPU-based, another that is GPU-based. Since each will have its own copy of kernel-pod.yaml file, you can modify the pod's yaml to have the appropriate node affinity, etc., relative to GPU allocation. See Kernelspec Modifications <https://jupyter-enterprise-gateway.readthedocs.io/en/latest/kernel-kubernetes.html#kernelspec-modifications> for how to go about exposing the kernelspecs so you can customize the kernel-pod.yaml file. Once parameterized kernels are "a thing", you'd likely be able to do this with a single kernelspec where the parameters dictate how configurations are applied - but those aren't a thing at the moment. 2. Enterprise Gateway provides some basic application-level authorization such that you can specify lists of authorized (and unauthorized users) within a kernel specification. These lists are checked prior to the kernel's launch. If authorized users exist in the list, then the invoking user must be in that list (i.e., non-existence is an implied denial). Authorization can be applied at the global level <https://jupyter-enterprise-gateway.readthedocs.io/en/latest/getting-started-security.html#authorization> (such that the values span all kernelspecs) and at the kernel level <https://jupyter-enterprise-gateway.readthedocs.io/en/latest/config-options.html#per-kernel-configuration-overrides> (as mentioned previously). The more specific authorization settings will be applied unless the user resides in the global unauthorized_users list - in which case that user is not permitted to start any kernels. Regards, Kevin. On Sunday, August 18, 2019 at 9:36:24 AM UTC-7, Amar Nath Vishwakarma wrote: > > Hello, > > I have a custom kernel performing some data science. The kernels are > being launched in kubernetes cluster comprising of normal CPU machines and > GPU machines through enterprise gateway. I want to launch the kernel based > on user selection (i.e. CPU/GPU). e.g. If user selects GPU then users > kernel docker should be launched on GPU machine otherwise on normal > machine. > > Also, I want to add custom kernels at regularly and restrict access to > some of them for certain user. > > Therefore, I wanted to know that whether this is possible through > enterprise gateway? If yes, what are the steps or any suggested link. > > Regards, > Amar Nath > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/78a3bb51-1908-4ac3-a59b-d5cfca4dfc92%40googlegroups.com.
