HPC Grid Tutorial: How to Create a Conda Environment

Follow these steps to create a conda environment. 

1. Log on to the Grid.

2. Start an interactive job: qsub -I

3. Load the python module: ml python/3.7

4. Create the environment using the conda create command:conda create -n myenv

Note: Replace myenv with the environment the name

Press 'y' to proceed

5. Once the environment is created, activate it using the following commands.

Type: source conda.sh

Type: conda activate myenv

Now that the environment is activated, you will be able to use conda within the environment to install any packages you need.

Conda Environments within Jupyter on OnDemand

To make the environment available within Jupyter Notebook on OnDemand follow these steps.

1. Enter the following while in the environment.

Type: conda install pip

Press 'y' to proceed

2. Type: conda install ipykernel 

Press 'y' to proceed

3. Type: python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

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