Closed davidslac closed 7 years ago
@weninc We get a long list of conda environments when jhub is started, it is generated by the nb_conda_kernels package.
If we remove the file /reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.1.0-py3/etc/jupyter/jupyter_notebook_config.json
/reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.1.0-py3/etc/jupyter/jupyter_notebook_config.json
then we only get the kernels that we are configuring via our own json files
Options 1 remove this file as a postprocessing step 2 manage our own _nb_ext_conf package, which installs this file and others 3 hack nb_conda_kernels package to generate the correct packages for us, that is this line https://github.com/Anaconda-Platform/nb_conda_kernels/blob/master/nb_conda_kernels/manager.py#L184 loops through all the environments, and this line https://github.com/Anaconda-Platform/nb_conda_kernels/blob/master/nb_conda_kernels/manager.py#L194 currently doesn't set the environment variables we need (SIT_DATA) that we handline in #10 , so we wouldn't do #10 if we forked nb_conda_kernels
the file we might delete with 1) has the content
(ana-1.1.0-py3) (psreldev) psel701: /reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.1.0-py3/etc/jupyter $ cat jupyter_notebook_config.json.remove { "NotebookApp": { "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager", "nbserver_extensions": { "nb_conda": true, "nb_anacondacloud": true, "nbpresent": true } } }
that is it loads this new conda kernel spec -- we are currently loading the kernels we want through the standard kernel spec - so this new one must run the standard, and do more - call old method, add their own, and return all environments.
we're generating our own kernel files, no issue here anymore
@weninc We get a long list of conda environments when jhub is started, it is generated by the nb_conda_kernels package.
If we remove the file
/reg/g/psdm/sw/conda/inst/miniconda2-prod-rhel7/envs/ana-1.1.0-py3/etc/jupyter/jupyter_notebook_config.json
then we only get the kernels that we are configuring via our own json files
Options 1 remove this file as a postprocessing step 2 manage our own _nb_ext_conf package, which installs this file and others 3 hack nb_conda_kernels package to generate the correct packages for us, that is this line https://github.com/Anaconda-Platform/nb_conda_kernels/blob/master/nb_conda_kernels/manager.py#L184 loops through all the environments, and this line https://github.com/Anaconda-Platform/nb_conda_kernels/blob/master/nb_conda_kernels/manager.py#L194 currently doesn't set the environment variables we need (SIT_DATA) that we handline in #10 , so we wouldn't do #10 if we forked nb_conda_kernels
the file we might delete with 1) has the content
that is it loads this new conda kernel spec -- we are currently loading the kernels we want through the standard kernel spec - so this new one must run the standard, and do more - call old method, add their own, and return all environments.