Skip to content

Conversation

@pditommaso
Copy link
Collaborator

Summary

Enable sharded repodata for pixi-based container builds by automatically mapping well-known conda channels to their prefix.dev mirrors:

  • conda-forgehttps://prefix.dev/conda-forge
  • biocondahttps://prefix.dev/bioconda

Rationale

According to the prefix.dev blog post on sharded repodata, using prefix.dev mirrors provides significant performance improvements for package resolution:

  • 50x faster package resolution on fresh downloads
  • Up to 100x faster with cached operations
  • Reduces conda-forge index size from 243 MB to 0.421 MB

The sharded repodata architecture splits package metadata into content-addressed shards (one per package name), enabling aggressive caching and faster downloads compared to monolithic repodata.json files.

Implementation

  • Added mapChannelsToPixiServers() method in PixiHelper to map known channels to prefix.dev mirrors
  • Modified condaFileFromRequest() in ContainerHelper to apply channel mapping only when buildTemplate == CONDA_PIXI_V1
  • Other build templates (micromamba v1/v2) remain unchanged

Test plan

  • Unit tests for channel mapping logic in PixiHelperTest
  • Integration tests in ContainerHelperTest verifying mapping is applied only for pixi builds
  • Manual verification of pixi build performance improvement

🤖 Generated with Claude Code

Enable sharded repodata for pixi-based container builds by automatically
mapping well-known conda channels to their prefix.dev mirrors:
- conda-forge -> https://prefix.dev/conda-forge
- bioconda -> https://prefix.dev/bioconda

This provides 50-100x faster package resolution according to:
https://prefix.dev/blog/sharded_repodata

The mapping is only applied when using the CONDA_PIXI_V1 build template,
leaving other build templates (micromamba v1/v2) unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants