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

Pixi requires cuda in system-requirements even if CUDA is installed by Pixi via dependencies #1288

Open
2 tasks done
garymm opened this issue Apr 26, 2024 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@garymm
Copy link

garymm commented Apr 26, 2024

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

[project]
name = "jax-env"
channels = ["conda-forge", "nvidia"]
platforms = ["linux-64"]

[dependencies]
jax = ">=0.4.23,<0.5.0"

[host-dependencies]
python = ">=3.10,<3.11"

[target.linux-64.dependencies]
jaxlib = { version = ">=0.4.23,<0.5.0", build = "*cuda12*" }
cuda-nvcc = ">=12.0,<13"
cuda-cupti = "*"

With this file, pixi install fails with:

 × failed to solve the conda requirements of 'default' 'linux-64'
  ╰─▶ Cannot solve the request because of: jaxlib >=0.4.23,<0.5.0 *cuda12* cannot be installed because there are no viable options:
      └─ jaxlib 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 | 0.4.23 would require
         └─ __cuda *, for which no candidates were found.

Issue description

But if I add:

[system-requirements]
cuda = "12"

Then things work.
This is ugly because:

  1. It's not a system requirement: it's managed by pixi.
  2. I only want it to apply to a specific target, not all targets.

Expected behavior

No system-requirements required.

@garymm garymm added the bug Something isn't working label Apr 26, 2024
@dennis-wey
Copy link

We are having the same issue.
I think it's related to #480

@2themaxx
Copy link

2themaxx commented May 7, 2024

Editing to add that this behavior is also on Windows. I've been trying to run pytorch stuff on Windows and was pulling my hair out as to why cuda wasn't available. The "system-requirements" bug is above is the reason.

Adding:

[tool.pixi.system-requirements]
cuda = "12"

to the pyproject.toml is required to get pytorch with cuda to work.

executing
pixi run python -c "import torch;print(torch.cuda.is_available())"

returns "False" without the "tool.pixi.system-requirements" and the cuda requirement to the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants