From f309b526a83dcc6ccd16787e0c6daf027d1d6961 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Thu, 18 Mar 2021 09:55:37 +0100 Subject: [PATCH] ml/pangeo-notebook: don't register the same jupyter kernels twice --- ml-notebook/jupyter_notebook_config.py | 5 +++++ pangeo-notebook/jupyter_notebook_config.py | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 ml-notebook/jupyter_notebook_config.py create mode 100644 pangeo-notebook/jupyter_notebook_config.py diff --git a/ml-notebook/jupyter_notebook_config.py b/ml-notebook/jupyter_notebook_config.py new file mode 100644 index 00000000..1d5e5598 --- /dev/null +++ b/ml-notebook/jupyter_notebook_config.py @@ -0,0 +1,5 @@ +import os + +# Configure nb_conda_kernels to avoid registering jupyter kernels in our conda +# environment again. +c.CondaKernelSpecManager.env_filter = f'.*envs/{os.environ["CONDA_ENV"]}.*' diff --git a/pangeo-notebook/jupyter_notebook_config.py b/pangeo-notebook/jupyter_notebook_config.py new file mode 100644 index 00000000..1d5e5598 --- /dev/null +++ b/pangeo-notebook/jupyter_notebook_config.py @@ -0,0 +1,5 @@ +import os + +# Configure nb_conda_kernels to avoid registering jupyter kernels in our conda +# environment again. +c.CondaKernelSpecManager.env_filter = f'.*envs/{os.environ["CONDA_ENV"]}.*'