This tutorial shows step by step how to create a conda environment for Jupyter Notebook OnDemand.
Step 1
Log in to the Grid. Start an interactive job: srun -q primary -N 1 -n 8 --mem 4G -t 10:00:00 --pty bash

Step 2
After being assigned a node, run the following: ml python/3.7
Type: conda create -n myenv

Enter y to proceed.

Step 3
After the environment is created, it can be activated.
Type: conda activate myenv

Step 4
Install the packages pip and ipykernel.
Type: conda install pip ipykernel



Step 5
Next, you can create a visible kernel for your conda environment.
Type: python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

Now the environment will be available within Jupyter Notebook on OnDemand.