-
Notifications
You must be signed in to change notification settings - Fork 232
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
Unsolvable pypi dependencies if platform excluded by feature #1051
Comments
Fixes #1036 With the following pixi toml: ```toml [project] name = "project" channels = ["conda-forge"] platforms = ["linux-64", "osx-arm64"] [dependencies] python = "3.11.8" [pypi-dependencies] timeago = "==1.0.16" [feature.test] platforms = ["linux-64"] [environments] test = ["test"] ``` The environment `test` is only solvable for `linux-64`. However, when trying to solve this lock-file on another platform no python interpreter can be installed for the environment because the environment does not support it. This PR shows a problem that we should fix, see #1051 for that tracking issue.
I'm hitting this problem simply because I'm using a I understand pixi assumes PyPI-dependencies exist in this condition, migrated automatically from the project's dependencies entry, even in the case they are also declared on the default feature Now, this project happens to depend on pytorch. So, I followed the multi-env procedure to try to setup a CUDA-enabled environment for production as described in the pixi manual. Unfortunately, that won't work due to this issue. I guess this problem would hit more often users of May be the current error message could be updated in this regard by looking at the manifest type and suggesting a more appropriate action (e.g. do not use a |
One question regarding this one: what would be the best way to mitigate this issue in your opinion? Having a separate directory with a |
As I a said in a previous issue I think there are two approaches. Let me quote myself:
For 2) I think it makes sense to specify this seperately :) |
Note that the |
I'd like to document a workaround so that one can have a single manifest file, with CUDA support only for [tool.pixi.feature.cuda]
channels = ["nvidia", {channel = "pytorch", priority = -1}]
platforms = ["linux-64", "osx-arm64"]
[tool.pixi.feature.cuda.system-requirements]
cuda = "12.1"
# here is the trick - feature.cuda.dependencies is kept empty
# but we inject linux-64 dependencies with the target table
[tool.pixi.feature.cuda.target.linux-64.dependencies]
cuda = { version = "*", channel = "nvidia" }
pytorch-cuda = { version = "12.1.*", channel = "pytorch" }
[tool.pixi.environments]
cuda = { features = ["cuda"] } The trick is to make sure the feature has no |
He @anjos, the documentation contains a pseudo example, but feel free to improve it where you see fit. I'm not sure the change you propose is related to this issue. |
### What Still seeing CI failure for the arm environment: https://github.com/rerun-io/rerun/actions/runs/10076555033/job/27858201887 This seems like we're hitting: prefix-dev/pixi#1051 Refactor to keep arm64 in examples-common but just scope the incompatible packages, even though the redundancy is annoying. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6980?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6980?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/6980) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
An updated link for the feature table is https://pixi.sh/latest/reference/project_configuration/#the-feature-table |
…n `pixi_install_wheel.py` (#9203) ### What The fact that `examples-common` does not support linux-arm was still leading to pixi confusion when trying to install the wheel into the environment, even though it should be totally valid. - This is still related to: prefix-dev/pixi#1051 Just updating the wheel for the current platform we are testing appears to work around the problem.
The following manifest supports several platforms but the
test
environment only supportslinux-64
:All environments also have
pypi-dependencies
(because they are in the default feature), this means that to be able to solve this project we need a Python interpreter at runtime. The problem is that thetest
environment only supportslinux-64
which means that on any other platform, there is no Python interpreter available and you get this error (after #1052 is merged):I don't know what the solution to this problem would be. Perhaps we create a subset "solve environment" that just includes python which we can try to install to solve pypi-dependnencies regardless of the platform? That would also alleviate some of the issues reported in #1046.
The text was updated successfully, but these errors were encountered: