optional cuda system dependency #2746
-
my pyproject.toml looks like [project]
name = "chemxtract"
version = "1.0.0"
description = "foo"
authors = [{ name = "bar", email = "baz" }]
requires-python = "==3.13"
[tool.pixi.project]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64", "linux-aarch64"]
channels = ["pytorch", "conda-forge", "bioconda", "anaconda"]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.pixi.environments]
img2txt = { features = [
"img2txt",
"img2txt_base",
], solve-group = "img2txt", no-default-feature = true }
img2txt-cuda = { features = [
"img2txt_base",
"img2txt-cuda",
], solve-group = "img2txt", no-default-feature = true }
[tool.pixi.feature.img2txt_base.dependencies]
python = "~=3.12.0"
[tool.pixi.feature.img2txt_base.pypi-dependencies]
layoutparser = { version = "==0.3.4", extras = ["layoutmodels", "ocr"] }
easyocr = "~=1.7.2"
[tool.pixi.feature.img2txt.dependencies]
[tool.pixi.feature.img2txt.pypi-dependencies]
paddlepaddle = "~=2.6.2"
[tool.pixi.feature.img2txt-cuda]
platforms = ["win-64", "linux-64"]
system-requirements = { cuda = "12" }
[tool.pixi.feature.img2txt-cuda.target.linux-64.dependencies]
cuda-version = { version = ">=12.0,<=12.6" }
[tool.pixi.feature.img2txt-cuda.target.linux-64.pypi-dependencies]
paddlepaddle-gpu = "~=2.6.2" A what is wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
With the current implementation, we make the solve group environments behave as one. For now the fix would be to skip the solve-group. |
Beta Was this translation helpful? Give feedback.
-
this works now! On osx-arm64 with no CUDA: ~/sandbox/pixi2746 is 📦 v1.0.0 via 🐍 via 🧚 v0.50.2
❯ pixi shell --environment img2txt
~/sandbox/pixi2746 is 📦 v1.0.0 via 🐍 v3.12.11 via 🧚 v0.50.2 (img2txt)
❯ pixi ls -x
Environment: img2txt
Package Version Build Size Kind Source
easyocr 1.7.2 15 MiB pypi easyocr-1.7.2-py3-none-any.whl
layoutparser 0.3.4 22.7 MiB pypi layoutparser-0.3.4-py3-none-any.whl
paddlepaddle 2.6.2 270 MiB pypi paddlepaddle-2.6.2-cp312-cp312-macosx_11_0_arm64.whl
python 3.12.11 hc22306f_0_cpython 12.4 MiB conda https://conda.anaconda.org/conda-forge/ |
Beta Was this translation helpful? Give feedback.
With the current implementation, we make the solve group environments behave as one. For now the fix would be to skip the solve-group.