Hi! I’m reading the doc and doing some test installs and was wondering if it’s possible to spawn local single-user servers in another environment than the one JupyterHub is using, and exactly how.
I understood some parts of the doc (and the code) as contradictory in that regard, in particular in the Quickstart installation section you have:
conda install jupyterlab notebook # needed if running the notebook servers in the same environment
which suggests you could run them in another environment, however technically with e.g. LocalProcessSpawner the default is to run jupyterhub-singleuser which is shipped by JupyterHub and not JuperterLab or Notebook, and tries to import and use jupyter_server. It’s also stated elsewhere in the docs that one of the purpose of jupyterhub-singleuser is to check if the version of JupyterHub and e.g. JupyterLab matches, and that seems to contradict the claim it is possible to run the notebook servers in a different environment?
Yes, this is possible and pretty standard. You do need the jupyterhub package in both environments (or jupyterhub-singleuser if you are using conda) because that one package implements both sides of JupyterHub - the authentication in the singleuser-server, and the Hub itself.
Here’s an example of separate envs with conda:
First, create an env for the hub (with jupyterhub), and a second env with jupyterhub-singleuser for users: