Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pixi as an install tool #2099

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Oct 17, 2024

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python conda_smithy/schema.py)

Only an experiment for now. Testing at conda-forge/dav1d-feedstock#21.

Will close conda-forge/conda-forge.github.io#2323.

@jaimergp jaimergp changed the title (WIP) Support pixi as an install tool Support pixi as an install tool Oct 18, 2024
@jaimergp
Copy link
Member Author

jaimergp commented Oct 18, 2024

This is mostly functional. See last runs at conda-forge/dav1d-feedstock#21.

It provisions the base environment in a similar way to what micromamba does, but the dependency list is coming from the pixi.toml file. Since we have to populate that anyway, I also rendered a few convenience tasks for local users, so they can just do pixi run build, pixi run rerender, etc. Not perfect or a 1:1 correspondence to CI (for that they have pixi run build-locally), but a first approach to see how it feels.

To note:

  • The installation paths do not correspond 1:1 either, but the "spirit" is there; e.g. on Windows we respect the drives so we get all the performance gains from D:.
  • There's an ugly hack to limit which platforms get solved in CI (we patch platforms in the TOML file), but hopefully that'll get added soon in Pixi so we just use a flag like --platforms=linux-64 for overrides.
  • Pixi doesn't seem to offer PowerPC binaries? nvm: enable ppc64le pixi-feedstock#78

Anyway, fun stuff! The linux timings are impressive; around 10s thanks to the shared pkgs cache. macOS and Windows stay under a minute.

If this is considered for merge, I'd leave it as opt-in for now, so folks can experiment on their feedstocks and go back to micromamba if needed. Happy to add a warning or something to consider it "experimental" too.

conda-forge/staged-recipes#27754 is the equivalent PR in staged-recipes.

@jaimergp jaimergp marked this pull request as ready for review October 18, 2024 12:08
@jaimergp jaimergp requested a review from a team as a code owner October 18, 2024 12:08
Copy link
Member

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The handling of local_ci_setup might be flawed right now IIUIC.

The current procedure on main installs the conda package, then force uninstalls it to leave the deps in the env, and then does the pip install without deps.

The code in this PR does a pip install on top of the conda package.

IDK if those two things are equivalent.

We should test this in the ci-setup feedstock.

@jaimergp
Copy link
Member Author

Agreed, I haven't tested that, mostly left it there as a reminder of sorts. Worst case conda-forge-ci-setup can stay with conda_install_tool = "micromamba". Let me give it a try in the feedstock though.

conda_smithy/templates/pixi.toml.tmpl Outdated Show resolved Hide resolved
@jaimergp
Copy link
Member Author

See conda-forge/conda-forge-ci-setup-feedstock#361 for ci-setup tests.

Copy link
Member

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT to me assuming all of the feedstock tests work. I've been merging a bit fast I think since I've seen a few comments on PRs after I have merged them here. So i'll bump @conda-forge/core to look at this one too.

@jaimergp
Copy link
Member Author

No probs, thank you for the reviews! I'm in no rush here, was just following the momentum of the micromamba changes because I had all that mental model in the "hot cache" part of my brain :P

For those checking the PR now or later, this comment summarizes the changes: #2099 (comment).

@h-vetinari
Copy link
Member

Haven't reviewed, but I think this is a great initiative and thanks a lot for pushing it forward. I checked out conda-forge/dav1d-feedstock#21 and I think it's really cool (aside from the speed gains) that with pixi tasks, we'll provide a much simplified interface for building things locally, e.g. pixi run build-linux_64_. 😎

@mfisher87
Copy link
Member

we'll provide a much simplified interface for building things locally, e.g. pixi run build-linux_64_

Oooo... amazing! I love that re-rendering is now a task, too!

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.

Move CI setup to pixi
4 participants