OK - I would suggest you take this approach.
Instead of issuing this command (I don’t know about the ~/.bashrc)
/gpfs/shared/apps_local/python/3.7-1.20/condabin/conda init
Find your kernel(s) and/or move them to some appropriate place and add that directory to the JUPYTER_PATH
.
Here’s what I just tested with:
export JUPYTER_PATH="$JUPYTER_PATH:/users/PZS0714/johrstrom/ondemand/app-testing/kernels"
I just tested this similar setup. I have the conda environment in a different location than my kernels. I’ve added this directory to the JUPYTER_PATH
and they show up in jupyter lab.
Note the kernesl/kernels
directory name - I just didn’t have a better name for the top level directory that I wanted Jupyter to search through for testing this out.
Essentially what ever directory you add to JUPYTER_PATH
it should have 1 child directory named kernels
and it has children for each kernel.
[johrstrom kernels()] pwd
/users/PZS0714/johrstrom/ondemand/app-testing/kernels
[johrstrom kernels()] ll kernels/conda_discourse-2511/
total 24
-rw-r--r-- 1 johrstrom PZS0714 327 Mar 9 13:02 kernel.json
-rw-r--r-- 1 johrstrom PZS0714 1084 Mar 9 13:02 logo-32x32.png
-rw-r--r-- 1 johrstrom PZS0714 2180 Mar 9 13:02 logo-64x64.png
-rw-r--r-- 1 johrstrom PZS0714 9605 Mar 9 13:02 logo-svg.svg
[johrstrom kernels()] cat kernels/conda_discourse-2511/kernel.json
{
"argv": [
"/users/PZS0714/johrstrom/ondemand/app-testing/conda/discourse-2511/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "discourse-2511 [/users/PZS0714/johrstrom/ondemand/app-testing/conda/discourse-2511]",
"language": "python",
"metadata": {
"debugger": true
}
}[johrstrom kernels()]