fix: Handle CONDA_OVERRIDE_* in pixi global install#6335
Open
hunger wants to merge 5 commits into
Open
Conversation
5 tasks
Contributor
Author
|
The more I think about it: I should store a conda-meta/pixi file with resolved platform and minimal platform, just like I do for "local" environments. That is inherently environment specific information. I'll change this. |
4a7ef48 to
030f755
Compare
Pull the per-subdir core of compute_minimal_required_platforms into a public minimal_required_virtual_packages(&[&str]) so pixi global can derive the same minimum-platform set from an installed environment's records.
Make EnvironmentFile, its fields, LockedEnvironmentHash::invalid and write_environment_file public, and add PlatformData::new, so pixi global can write the same conda-meta/pixi marker that workspace environments do.
…x-dev#6323) Solve pixi global environments against machine-detected virtual packages via VirtualPackageOverrides::from_env(), so CONDA_OVERRIDE_* (e.g. CONDA_OVERRIDE_CUDA=12.0) is honored and run constraints on virtual packages are respected. Record the resolved platform and the minimum-supported platform in the environment's conda-meta/pixi marker, reusing the EnvironmentFile, PlatformData and minimal-platform code shared with non-global environments. Fixes prefix-dev#6323.
Document that pixi global records the resolved and minimum-supported platform in an environment's conda-meta/pixi marker and how CONDA_OVERRIDE_* feeds the solve.
030f755 to
497b857
Compare
Contributor
Author
|
@baszalmstra: Simplified it a bit more and store the data on the platform used to resolve in the environment itself. Works now:-) |
Install the `cuda` package from the virtual packages channel in test data with and without CUDA version overrides and verify the override works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a counter proposal to PR #6325 by @baszalmstra.
The issue that go reported is basically that
pixi global installignores CONDA_OVERRIDE_* variables. The user was usingCONDA_OVERRIDE_CUDA=12to limit his support to a version lower than what was available on his machine and pixi install still installing for__cuda=13.So we need to take CONDA_OVERRIDE_* into account. This change uses the auto-detected rich platform as a base line (which takes CONDA_OVERRIDE_* into accound), and stores the minimum and the version an environment was resolved for in the generated environment, so that the information does not get lost between runs.
@baszalmstra PR #6325 used system requirements table to the pixi-global toml manifest for this
Fixes: #6323