cacheport

Ecosystem · Python

Conda channel cache for CI

Conda environments pull large binary packages from channels like conda-forge. Cacheport proxies those channels behind one channel_alias, so environment builds stop depending on a distant CDN.

CP-CONDAManifest
Upstream
conda.anaconda.org (conda-forge, bioconda and others)
Endpoint
https://acme.cacheport.cc/conda/<channel>/
Config
channel_alias in .condarc
Clients
conda, mamba, micromamba, pixi
Repodata
Refreshed every 15 minutes
Packages
.conda and .tar.bz2 cached forever

How Conda caching works

Conda channels publish a repodata.json per platform listing every package, and then the packages themselves. The repodata for conda-forge is large and changes constantly; the packages never change once published. Cacheport refreshes repodata on a schedule and keeps packages permanently.

Setting channel_alias makes short channel names like conda-forge resolve against Cacheport instead of conda.anaconda.org, without editing every environment file.

What gets cached
repodata.json
Refreshed every 15 minutes per channel and platform, stale copy on failure.
Packages
Both .conda and .tar.bz2 formats, cached forever.
Channels
Any public channel on conda.anaconda.org, plus private channels you add.

Set it up

.condarc

~/.condarc
channel_alias: https://acme.cacheport.cc/conda/
channels:
  - conda-forge
channel_priority: strict

Credentials in CI

shell
export CONDA_CHANNEL_ALIAS="https://ci:${CACHEPORT_TOKEN}@acme.cacheport.cc/conda/"
conda env create -f environment.yml

Conda maps every setting to a CONDA_ environment variable, so the token can live in your CI secrets and never in .condarc.

Use it in CI

Store the token as a secret named CACHEPORT_TOKEN, then pick your provider.

GitHub Actions

.github/workflows/ci.yml
jobs:
  test:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash -el {0}
    env:
      CONDA_CHANNEL_ALIAS: https://ci:${{ secrets.CACHEPORT_TOKEN }}@acme.cacheport.cc/conda/
    steps:
      - uses: actions/checkout@v4
      - uses: conda-incubator/setup-miniconda@v3
        with:
          environment-file: environment.yml
          channels: conda-forge
      - run: pytest

More for GitHub Actions: GitHub Actions setup guide.

GitLab CI

.gitlab-ci.yml
test:
  image: condaforge/miniforge3
  script:
    - export CONDA_CHANNEL_ALIAS="https://ci:${CACHEPORT_TOKEN}@acme.cacheport.cc/conda/"
    - conda env create -f environment.yml -n ci
    - conda run -n ci pytest

More for GitLab CI: GitLab CI setup guide.

Licensing of the defaults channel

Cacheport proxies channels, it does not change their terms. Packages from conda-forge and bioconda are community channels. If you use Anaconda's own channels, the terms of service for those channels still apply to your organisation.

Questions

Does it work with mamba and micromamba?

Yes. They read the same channel settings and use the same endpoints.

Can I proxy a private channel?

Yes. Add it as an upstream and it appears under /conda// with the same token.

How fresh is repodata?

Every 15 minutes by default. You can lower it to 1 minute on paid plans.

Other ecosystems people set up next

Start on the free plan

20 GB of cache, every registry, unlimited users. Upgrade when your pipelines outgrow it.