Skip to content

use GHCR mirror for cog-base images in integration tests#2866

Open
markphelps wants to merge 1 commit intomirror-cog-base-workflowfrom
registry-tests
Open

use GHCR mirror for cog-base images in integration tests#2866
markphelps wants to merge 1 commit intomirror-cog-base-workflowfrom
registry-tests

Conversation

@markphelps
Copy link
Contributor

@markphelps markphelps commented Mar 25, 2026

Summary

Update CI and integration tests to resolve cog-base images from GHCR instead of r8.im.

Depends on: #2871 (mirror workflow) being merged and run first to populate GHCR.

Changes

File Change
.github/workflows/ci.yaml Set COG_REGISTRY_HOST=ghcr.io/replicate/cog in integration test env
integration-tests/harness/harness.go Add COG_REGISTRY_HOST to propagatedEnvVars so cog serve inherits it
5 × .txtar test files Remove registry-start/registry-seed/env COG_REGISTRY_HOST boilerplate from tests that can use the shared GHCR mirror

How it works

CI sets COG_REGISTRY_HOST=ghcr.io/replicate/cog, so all cog build commands resolve base images from ghcr.io/replicate/cog/cog-base:<tag> instead of r8.im/cog-base:<tag>.

  • CPU tests (~100+): resolve cog-base:python3.12 etc. from GHCR
  • GPU tests (~20): resolve cog-base:cuda12.4-python3.12-torch2.5.1 etc. from GHCR
  • Tests with registry-start (3): push to their own per-test registry, unaffected

5 tests that previously started per-test registries and seeded fake cog-base images now use the GHCR mirror directly:

  • build_base_image_sha.txtar
  • build_cog_version_match.txtar
  • build_python313_base_image.txtar
  • torch_cuda_baseimage.txtar
  • torch_baseimage_fallback.txtar

@markphelps markphelps marked this pull request as ready for review March 26, 2026 18:19
@markphelps markphelps requested a review from a team as a code owner March 26, 2026 18:19
@markphelps markphelps changed the title fix: disable cog base image fetch in integration tests to remove r8.im dependency use GHCR mirror for cog-base images in integration tests Mar 26, 2026
Set COG_REGISTRY_HOST=ghcr.io/replicate/cog in CI so integration tests
resolve cog-base images from GHCR instead of r8.im.

CI changes:
- Set COG_REGISTRY_HOST in the integration test job env

Harness changes:
- Add COG_REGISTRY_HOST to propagatedEnvVars so cog serve inherits it

Test simplification:
- 5 tests no longer need per-test registries since they can resolve
  cog-base images from the GHCR mirror via COG_REGISTRY_HOST:
  build_base_image_sha, build_cog_version_match,
  build_python313_base_image, torch_cuda_baseimage,
  torch_baseimage_fallback
@markphelps markphelps changed the base branch from main to mirror-cog-base-workflow March 26, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant