Setting up JupyterHub as root (via pip/npm) so each system user can access their own conda environments (/home/$USER/.conda/envs)?

Hello,

I’m in the process of setting up JupyterHub for our group on our shared compute resources. I managed to get Jupyterhub to run and integrate with system users (installed via pip/npm, as per this wiki page), so each user on the machine can login with their system username/password and access files in their home directory. Now I’m wondering how I can allow users to access and activate their own conda environments within JupyterHub/notebooks?

Each user has their own conda environments in /home/$USER/.conda/envs, these are not shared between users, and are not system-wide.

I found some information on accessing conda environments through JupyterHub online, but that seemed to only be applicable for when JupyterHub was installed by the user themselves, in their ‘base’ environment. So I’m not sure how this can be done at a system-level.

Would appreciate any guidance on this!

Thanks,

Michael