Multi-user Conda environments: a worked example installing QIIME2 Amplicon

QIIME2 Amplicon occupies 15GB on disk, so you don’t really want each user installing it in their own home directory because of the amount of space that multiple parallel installations will consume. It also takes a long time to install, which is not as pleasant a user experience as having it already there for immediate use.

The following guide is written using a Debian system. The only step that ought to differ between Debian-like and RedHat-like systems is the first step: installing Conda itself.

Systems administrators’ guide

1: Install Conda

Become root, then follow along with https://conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html to add the Miniconda package repository to your computer and then run apt install conda.

2: Share the multi-user environments with your users

Create /opt/conda/.condarc containing:

channels:
  - defaults
pkg_dirs:
  - /shared/conda/pkgs
  - $HOME/.conda/pkgs
envs_dirs:
  - /shared/conda/envs
  - $HOME/.conda/envs

3: Install QIIME2 Amplicon

Fetch the Conda environment definition for QIIME2 Amplicon: wget https://data.qiime2.org/distro/amplicon/qiime2-amplicon-2024.5-py38-linux-conda.yml then review qiime2-amplicon-2024.5-py38-linux-conda.yml to make sure that it’s going to behave benignly towards your system.

Once you are happy: conda env create -p /opt/conda/envs/qiime2-amplicon-2024.5 --file qiime2-amplicon-2024.5-py38-linux-conda.yml and wait for a long time. The use of -p differs from the official QIIME2 installation instructions and is the “special sauce” that puts the QIIME2 environment into a shared location, /opt/conda/envs, instead of /root/.conda/envs.

Test the QIIME2 installation by dropping back into an unprivileged account and following the Users’ guide below.

Users’ guide

My sysadmin installed QIIME2. How do I access it?

Start with: source /opt/conda/etc/profile.d/conda.sh. You can put that in your .bashrc/.zshrc/whatever-your-profile-file-is-called to run every time you login.

conda env list should get you a list containing qiime2-amplicon-2024.5 and the following should show you some information about your QIIME2 installation:

conda activate qiime2-amplicon-2024.5
qiime info

How do I use QIIME2?

I am not a bioinformaticist so I cannot help you there. https://docs.qiime2.org/2024.5/ has some tutorials.