Skip to main content

conda-quickstart

Last updated on

Prerequisites

  • Ensure you have the Conda CLI (conda) and Harness CLI installed on your local machine.
  • Access to a Harness account with appropriate permissions to create registries and connectors.

Create a Conda Artifact Registry

private registry

This registry will serve as your private Conda registry within Harness.


Configure an Upstream Proxy (Optional)

An upstream proxy allows your registry to fetch Conda packages from external sources if they are not available locally.

Create an upstream proxy


Configure the upstream proxy in your registry

upstream proxy caching

If a Conda package isn’t found in your Harness registry, the upstream proxy fetches it from an external registry like bioconda, reducing duplication and improving package resolution.


Publish & Install Conda packages

Authenticate the Conda client

  1. In your Harness Conda Artifact Registry, click Setup Client.
  2. Click Generate Token to generate an identity token.

Publish a Conda package

  1. Build a conda package using Conda CLI
conda build <PATH_TO_CONDA>
  1. Deploy the conda package to your Harness registry using the following command (using Harness CLI).
hc artifact push conda <REGISTRY_NAME> <FILE_PATH> --pkg-url pkg.app.harness.io

Install a Conda package

  • Install the conda package using Conda.
conda install --channel https://<HARNESS_USERNAME>:<TOKEN>@pkg.harness.io/pkg/<HARNESS_ACCOUNT_ID>/<CONDA_REGISTRY_NAME>/conda <ARTIFACT_NAME>=<VERSION>

Troubleshooting

If you encounter issues with package installation or updates, try clearing the Conda cache:

Clear Index Cache:

conda clean --index-cache

This removes the cached channel index, forcing Conda to fetch fresh package metadata.

Clear Cached Packages:

conda clean --packages --tarballs -y

This removes unused packages and compressed package files from the cache, freeing up disk space and resolving potential corruption issues.