Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

This article will explain how to set up the Miniconda Conda environment under a user’s HPC account.

...

The (base) confirms miniconda installed successfully and is in the default Conda environment.

\uD83D\uDCD8 Setting uDCD8 Setting up the Miniconda environment

Here is an example showing how to create a Conda environment called abinit to allow for a abinit install:

conda create --name abinit

If you would like a miniconda environment to have a specific version of python, the following command can be entered instead, which will install Python 3.9 within the abinit conda environment:

conda create -n abinit python=3.9

Activate the conda environment

...

Then a user should be able to call the abinit command(s) that are needed to run abinit successfully.

Deactivate conda environment

To deactivate the abinit conda environment, the following command can be entered:

...

That will tell miniconda to go back to the (base) Conda environment and at that point a new Conda environment can be installed or activated.

Testing miniconda environment in an interactive Slurm

...

job

fisbatch srun -N 1 -n 24 -p general

conda activate condaenvironmentname

commands for conda/program run

To exit out of the Slurm Fisbatch job and end miniconda:

Type exit twice to exit out of the conda environment, and then exit out of the Fisbatch job.

...

Next time a user logs into HPC, the terminal will show the (base) [netidhere@cnXXX ~] on the login node.\uD83D\uDCD8

Submission Script Example:

Here are the Bash Submission script steps to call the miniconda environment:

...

module load modulesneededhere

source /gpfs/homehomefs1/yournetidhere/miniconda3/etc/profile.d/conda.sh

...