Managing Conda Environments on the Cluster

Introduction

This guide provides a concise overview of managing Conda environments on the BGU HPC cluster.

The conda executable is not found on the login node bhn20. You can only interact with Anaconda from within a job. To do so, you can run any workspace from the following list and access the terminal from there, however we recommend following this part of the Jupyter Notebook guide

One-Time Configuration

  1. Set Up the Conda Configuration File

    Define ~/env as the default directory for Conda environments by creating or updating your .condarc file in your home directory:

    $ conda config --prepend envs_dirs ~/env

Verify the Configuration

Once inside the workspace, confirm the configuration:

$ conda config --show envs_dirs

Output should include the ~/env directory.

Managing Conda Environments

Once inside the job, you can create, activate, and manage Conda environments:

  • Create a New Environment:

    $ conda create --name myenv python=3.11
  • Activate an Environment:

    $ conda activate myenv
  • Deactivate the Current Environment:

    $ conda deactivate
  • List All Environments:

    $ conda env list

References