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

Error when pointing UV_PROJECT_ENVIRONMENT to /usr/local/ on latest UV version 0.4.13 #7583

Closed
rosssgill opened this issue Sep 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rosssgill
Copy link

rosssgill commented Sep 20, 2024

Hi there,

I've been previously using the docker image ghcr.io/astral-sh/uv:0.4.12-python3.11-bookworm-slim and successfully setting UV_PROJECT_ENVIRONMENT="/usr/local/" to point to the container's system python environment, similar to how @zanieb has done here: #6834 (comment). I noticed however that with the latest UV version 0.4.13, for example, using ghcr.io/astral-sh/uv:python3.11-bookworm-slim image, this is no longer possible and during the container build I get the following error:

[svc dev 6/8] RUN --mount=type=cache,target=/root/.cache/uv     --mount=type=bind,source=uv.lock,target=uv.lock     --mount=type=bind,source=pyproject.toml,target=pyproject.toml     --mount=type=bind,source=setup.py,target=setup.py     uv sync --frozen --no-install-project:
0.422 error: Project virtual environment directory `/usr/local/` cannot be used because it is not a virtual environment and is non-empty

I believe it may be related to this pull request #7527?

@zanieb
Copy link
Member

zanieb commented Sep 20, 2024

Ah sorry that's an oversight from the protections we added in #7522.

l'll fix this right away.

@zanieb zanieb self-assigned this Sep 20, 2024
@zanieb
Copy link
Member

zanieb commented Sep 20, 2024

I have a fix up in #7585

I haven't tested it yet though — if want to make sure it works for you that'd be helpful. I'll be adding test coverage for this functionality before merging.

@zanieb
Copy link
Member

zanieb commented Sep 20, 2024

This will be fixed in the next release (sometime today)

New integration test in #7591

@zanieb zanieb closed this as completed Sep 20, 2024
@zanieb zanieb added the bug Something isn't working label Sep 20, 2024
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

2 participants