Disable User Installed JupyterHub Extensions

Hi,
I am running JupyterHub in a kubernetes environment with a custom Docker Image based on JupyterHub Base Image.
I want to disallow the users from installing any extensions to JupyterLab.
Is there any way I can do that?
I have seen that you can disable extension manager but that’s not enough.
Users can still just run pip install <extension> and it gets loaded by Jupyter.
Does anyone know how to do this?
Thanks

A couple of things

  • you can define an allow list of extensions: Extensions — JupyterLab 4.2.5 documentation
  • you can connect the terminal and kernel to a different environment (or even pod!) so that packages installed there do not interact with the jupyter server environment (but that makes accessing files more difficult - you would need to manually mount the parts of filesystem which should be accessible).
  • you can disable pip-installs. This is what nebari does with conda-store serving for environment provisioning (I do not like it as a user, but I guess it would work for you).
1 Like