How to enable users to create custom environments and use them as notebooks

Hello folks,
I am trying to create custom environment which will persist in home storage.
I tried steps as mentioned by @mrocklin in above github issue link,

  • like created docker image with nb_conda_kernels Installed through root user
  • created ~/.condarc file with custom env location in persistent storage (home directory)
  • created test env with command conda create -n tenv --yes nb_conda_kernels (with nb_conda_kernels installed for that custom user)

but still, unable to see my custom env tenv listed on kernels list. I also restarted notebook, but no luck with tenv in kernel list.
perhaps, I can see and activate custom environment tenv via terminal
conda info -e
results in

# conda environments:
#
tenv                     /home/jovyan/my-conda-envs/tenv
base                  *  /opt/conda

can anyone help with, what possibly could’ve went wrong?

seems like I missed installing ipykernel on custom environment but after running below command to create environments, it solved my problem,

conda create -n tenv --yes python=3.8 ipykernel nb_conda_kernels

so updated steps should be:

  • created docker image with nb_conda_kernels and ipykernel Installed through root user
  • created ~/.condarc file with custom env location in persistent storage (home directory)
  • created test env with command conda create -n tenv --yes python=3.8 ipykernel nb_conda_kernels (with nb_conda_kernels and ipykernel installed for that custom user)
  • after few seconds, one should be able to see environments in kernels list
1 Like