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 doesn't seem to be isolating environments correctly #2747

Open
rohanaras opened this issue Dec 19, 2024 · 1 comment
Open

Pixi doesn't seem to be isolating environments correctly #2747

rohanaras opened this issue Dec 19, 2024 · 1 comment

Comments

@rohanaras
Copy link

I'm trying to install a Pixi environment in a docker container based on the image ate ghcr.io/prefix-dev/pixi:latest. I have a pyproject.toml that looks something like

[tool.pixi.dependencies]
python = ">=3.12"

[tool.pixi.pypi-dependencies]
local-package = { path = ".", editable = true }

[tool.pixi.feature.dev.pypi-dependencies]
custom-dev-dep = { git = "ssh://git@url/custom-dev-dep.git", rev = "revision" }

[tool.pixi.environments]
default = { features = [], solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }

Of interest here is the the dependency installed from a git repo. The container in question does not have git installed—however, I believe this shouldn't matter as in the container I install the default environment with

RUN pixi install -e default

This step, however, results in this error:

 => ERROR [base build 4/5] RUN pixi install -e prod                                                      68.7s
------
 > [base build 4/5] RUN pixi install -e prod:
68.59   × failed to solve the pypi requirements of 'default' 'linux-64'
68.59   ├─▶ Failed to download and build `dsrepo-backend @ git+ssh://
68.59   │   git@url/custom-dev-dep.git@revision`
68.59   ├─▶ Git operation failed
68.59   ╰─▶ Git executable not found. Ensure that Git is installed and available.
68.59

I don't get this error if I comment out the custom-dev-dep line in the pyproject.toml. This seems to suggest that Pixi is trying to fetch the requirements of the dev environment, even when I'm not asking for it—I feel like this isn't the expected behavior?

@akhmerov
Copy link

I believe you're seeing prefix-dev/pixi-docker#41 (see also #1388 and #2588)

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

No branches or pull requests

2 participants