ESIPFed / esiphub-dev

Development JupyterHub on AWS targeting pangeo environment for National Water Model exploration
MIT License
2 stars 1 forks source link

How do I create a custom conda environment in JupyterHub? #27

Closed rsignell-usgs closed 4 years ago

rsignell-usgs commented 5 years ago

To create a custom environment:

  1. Ensure that nb_conda_kernels is installed in the base conda environment. If it's not, ask the JupyterHub provider to include it!

  2. In JupyterHub, edit your ~/.condarc to specify a persisted directory (like /home/jovyan/my-conda-envs for your environments:

    channels:
    - conda-forge
    envs_dirs:
    - /home/jovyan/my-conda-envs
  3. Create your custom environment including the ipykernel package:

    conda create   -n my_new_custom_env      my_package_1  my_package_2 ipykernel

Stop and start your server.

You should now be able to see your custom env on the kernel pick list: 2019-02-06_16-15-40

ColinTalbert commented 5 years ago

Worked perfectly!

dnowacki-usgs commented 4 years ago

Thanks Rich! The create line should read: conda create -n my_custom_env my_package1 mypackage2 ipykernel

rsignell-usgs commented 4 years ago

Thanks @dnoawcki-usgs! Corrected above!