Installing common packages depends on how your user environment is set up, and it differs if you are using containers or a shared filesystem, etc. So the first question is: what spawner are you using, and are you using the zero-to-jupyterhub helm chart or the-littlest-jupyterhub? Answering that will help give a more concrete answer.
In general, if it’s a JupyterLab extension, it’s one step: install the extension package in the Python environment where singleuser servers run. Once you do that, it should be available to all your users.
For the common custom kernel, it is similar:
- create the kernel environment (e.g.
python -m venv
orconda create
), and - ‘register’ the kernel so it will be found in the server environment with
/path/to/env/bin/python -m ipykernel install --name some-descriptive-name --system
(or--prefix /path/to/user/env
)
The main thing is that the kernelspec should be installed in one of the paths under data
in the output of jupyter --path
(/usr/local is always searched, as is sys.prefix)
Exactly how that is done will depend on how you create the user environment.
More general info in the docs, and specific info for zero-to-jupyerhub or the-littlest-jupyterhub.