Conda runtime

Run commands with access to a fully-managed Conda environment.

Conda is a very popular packaging system freely-available for all platforms. When you use Nextstrain CLI’s built-in Conda support, you don’t need to install any other Nextstrain software dependencies yourself as validated versions are already bundled into a package (nextstrain-base) by the Nextstrain team and automatically managed in an isolated location (isolated even from other Conda environments you may manage yourself).

Added in version 5.0.0.

Setup

On macOS and Linux, run nextstrain setup conda to get started.

This will download compressed packages totaling about 450 MB in size which expand to a final on-disk size of about 2 GB. Transient disk usage during this process peaks at about 3 GB. These numbers are current as of August 2023, as observed on Linux. Numbers will vary over time, with a tendency to slowly increase, and vary slightly by OS.

This runtime is not directly supported on Windows, but you can use WSL2 to “switch” to Linux and run the above setup command.

Environment variables

NEXTSTRAIN_CONDA_CHANNEL_ALIAS

The base URL to prepend to channel names. Equivalent to the channel_alias Conda config setting.

Useful if you want to use a Conda package mirror that’s not the default (i.e. not Anaconda’s).

Defaults to the Conda ecosystem’s default of https://conda.anaconda.org/.

Warning

The remaining variables are for development only. You don’t need to set these during normal operation.

NEXTSTRAIN_CONDA_CHANNEL

Conda channel name (or URL) to use for Nextstrain packages not otherwise available via Bioconda (e.g. nextstrain-base).

Defaults to nextstrain.

NEXTSTRAIN_CONDA_BASE_PACKAGE

Conda meta-package name to use for the Nextstrain base runtime dependencies.

May be a two- or three-part Conda package match spec instead of just a package name. Note that a conda install-style package spec, with a single = or without spaces, is not supported.

Defaults to nextstrain-base.

NEXTSTRAIN_CONDA_MICROMAMBA_URL

URL of a Micromamba release tarball (e.g. Conda package) to use for setup and updates.

May be a full URL or a relative URL to be joined with NEXTSTRAIN_CONDA_CHANNEL_ALIAS. Any occurrence of {subdir} will be replaced with the current platform’s Conda subdir value.

Replaces the previously-supported development environment variable NEXTSTRAIN_CONDA_MICROMAMBA_VERSION.

Defaults to conda-forge/{subdir}/micromamba-1.5.8-0.tar.bz2.

NEXTSTRAIN_CONDA_OVERRIDE_SUBDIR

Conda subdir to use for both Micromamba and the runtime environment.

If set, overrides the default behaviour of detecting the best subdir that’s usable for the platform.