Intro to Using Conda: Creating Python/R and other Application Environments

Introduction: This workshop will introduce what Conda is and how it can be used to create a variety of environments, such as Python/R and contained applications.

Course Goals:

  1. Introduce Conda and what it is good for, and how to use on ARCC’s clusters.

  2. How to use Conda to create a variety of environments - based on Python, R and standalone applications.

  3. Detail some of the core Conda configurations that affect your environment.


20240911: Currently, across many HPC centers, there are discussions and some confusion over the academic license terms for using miniconda3.

This is being reviewed by Anaconda.com, and we are awaiting clarity on the issue.

Depending on the outcome we might move to using miniforge, instead of miniconda3.

The concepts and context of this workshop should not change, just the name of the module that will need to be loaded.


Notes:

  • This workshop focuses purely on using Conda. We have a more advanced workshops that details the interplay between Python, Conda and Pip.

  • If you have existing Conda environments, or have installed your own version of Anaconda, then the examples within this workshop might provide different results.

  • We have tried to make the examples as generic as possible. You will need to replace <project-name> and <username> with appropriate values that apply to you.

  • This tutorial is available for download as a PDF here.


Sections

  1. What is Conda? Using Miniconda3 on the Cluster: Introduce conda, define some terminology, how to use on the cluster and finding help.

  2. Example 01: Python, Numpy and Pandas Environment: Demonstrate a basic conda environment creation workflow by creating a Python environment that contains the numpy and pandas packages.

  3. Conda Configuration and Environments: Understand some of the basic conda configurations and where environments are stored.

  4. Example 02: R and TidyVerse: Create an environment using the R language that includes the TidyVerse library.

  5. Conda Channels: What are channels and how can they be used and configured.

  6. Example 03: Applications: SLiM: Demonstrate using conda to install a command-line application.

  7. Reproducibility and Sharing: Introduce how conda environments can be reproduced and shared.

  8. Example 04: Application: Qiime Ecosystem: Demonstrate importing the large qiime application ecosystem.

  9. Conda with salloc and sbatch: Demonstrate best practices using Conda environments with salloc and sbatch.

  10. Conda Workshop: FAQs: A list of commonly asked questions that will be addressed here, but not necessarily within the workshop itself.

  11. Conda Workshop: Summary: Summarize the concepts covered across the workshop.