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

feat: use best_platform in a few places for cross-platform running #1020

Merged
merged 18 commits into from
May 6, 2024

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Mar 19, 2024

This is a draft. It adds a best_platform to most actions.

The idea is that we allow the selection of another platform than the current one for "cross-platform" running. For example, Apple has implemented pretty good x86 emulation via Rosetta which means that most osx-64 packages run very well on osx-arm64.

If a pixi.toml does not support osx-arm64 (yet) we allow to fall back to osx-64.

This is especially important for bioconda as they are currently not building any packages for osx-arm64.

@wolfv
Copy link
Member Author

wolfv commented Mar 19, 2024

fixes: #875

cc @corneliusroemer would be interested in your thoughts.

@pavelzw
Copy link
Contributor

pavelzw commented Mar 20, 2024

How about a small warning when the platform doesn't match your system platform?

@wolfv
Copy link
Member Author

wolfv commented Mar 20, 2024

Yes, agree with the warning.

I had another thought - we could also do a setting as in CONDA_SUBDIR=linux-64 where we would override the subdir per config / task / etc., e.g.

[platform."osx-arm64".options]
override_platform = "osx-64" # or platform_override?

But not sure if this is not too verbose.

Otherwise for configuration we would do somethign like:

platforms = ["osx-64", "osx-arm64:osx-64", "linux-*:linux-64"]

And map the platforms on each other like this.

@corneliusroemer
Copy link

corneliusroemer commented Mar 21, 2024

I don't know enough about pixi to be of much help except for quite high-level feedback.

Fallback sounds good, warning too. Make sense to allow disabling fallback.

Happy to test drive if you have something I can run locally.

@wolfv wolfv marked this pull request as ready for review April 30, 2024 14:02
Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

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

looks very good to me :)

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

This feature sounds logical but I would like some documentation and examples to try it out myself. As I can't get it to work from what I've been trying based on this pr.

src/cli/global/upgrade_all.rs Show resolved Hide resolved
src/cli/global/install.rs Show resolved Hide resolved
tdejager and others added 7 commits May 3, 2024 13:21
Enables the use of alternative PyPI registries. The definition of these
can be specified per feature. There are certain rules for making unions
out of these that are explained throughout the code.

This adds the options for:
* extra-index-urls
* index-urls
* find-links

Which follows the familiar pypi conventions. These are deserialized and
passed per environment or solve-group solve to uv.

---------

Co-authored-by: Bas Zalmstra <[email protected]>
Co-authored-by: Bas Zalmstra <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
@ruben-arts ruben-arts enabled auto-merge (squash) May 6, 2024 09:19
@ruben-arts ruben-arts merged commit 34105df into prefix-dev:main May 6, 2024
25 checks passed
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.

7 participants