Skip to main content

How to configure self-hosted runners

conda-forge has access to additional CI resources for feedstocks that can't build their packages in the default runners. Check Reference> Runners for a comprehensive list.

Request access

Open a PR in conda-forge/admin-requests by following the instructions in the repository README.

Note you need to specify the type of resource you want access to (e.g. GPU runners, or long-running CPU builds). Once merged, this will enable the requested self-hosted Github Actions runners for your feedstock.

Configure your feedstock

  1. In conda-forge.yml, ensure that the provider setting for the required build platform is set to github_actions.
  2. In recipe/conda_build_config.yaml, configure the github_actions_labels field to specify the runs-on value for each platform, using selectors as needed. The exact values depend on which runner type you requested and are listed in Reference> Runners.

Example

Refer to github_actions_labels.

Real world examples

Use this search query to find some real world examples in conda-forge.

Distinguishing CPU vs GPU jobs

Large runners are often required to build packages with GPU backends due to their CPU/RAM requirements, while their CPU-only counterpart builds fine on a regular runner. Splitting runner assignment between CPU and GPU requires some fiddling with the recipe skips. See this comment for context.

You'll need edits in both conda_build_config.yaml and your recipe file.

recipe/conda_build_config.yaml
# Note that the selector does NOT mention CUDA.
github_actions_labels:
- runner-for-cpu # [linux64]
- runner-for-gpu # [linux64]
tip

For the Github-hosted runners, you can use "default" instead of "runner-for-cpu"

Then in your recipe file:

build:
skip:
# Skip CPU jobs on GPU runner:
- cuda_compiler_version == "None" and github_actions_labels == "runner-for-gpu"
# Skip GPU jobs on CPU runner:
- cuda_compiler_version != "None" and github_actions_labels == "runner-for-cpu"