Conda virtual environment available to All users logged in to Jupyterhub and virtual environment to be visible to all users in jupyterlab

Have a requirement like created multiple conda virtual environments and all virtual environments created should be available to all users logged into jupyterhub and all the kernels should display to all users in jupyterlab ui, is this possible to achieve

A version of this has been asked and answered before, but the key bit of infomration needed to get a precise answer for JupyterHub is:

  • which Spawner is being used
  • who is creating the envs, and
  • when are envs created

In general, the short answer for making an environment available as a kernel is to run:

/path/to/env-name/bin/ipython-kernel install --prefix /path/to/singleuser-server-env --name env-name

for each env and make sure that all users have sufficient permission (read+execute) in the env. But this will look a little different if you are using containers (e.g. KubeSpawner) where this is done in the image vs multiple system users on a shared system (e.g. the default Spawner or systemd).

@minrk using local spawner and root user is creating the envs with read permissions. My requirement is all the envs to be available to all users from command line and at same time from jupyterlab when users logged in to jupyterlab and can have flexibility to work on all envs available.

Yup, then running the above command will work to make them available to all users. You can chose to install them in the single-user environment prefix, or make them always available with --prefix /usr/local.