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

[Feature request] Avoiding .venv in production #7342

Closed
pkucmus opened this issue Sep 12, 2024 · 7 comments
Closed

[Feature request] Avoiding .venv in production #7342

pkucmus opened this issue Sep 12, 2024 · 7 comments
Labels
duplicate This issue or pull request already exists question Asking for clarification or support

Comments

@pkucmus
Copy link

pkucmus commented Sep 12, 2024

Related to: #7341

When making a Docker image with my application I would like to achieve the equivalent of Poetry's POETRY_VIRTUALENVS_CREATE=false to use the only Python interpreter in the container. This would reduce need for consideration over the .venv directory being mixed in the host and in the container (as the container would not have one)

@jond01
Copy link

jond01 commented Sep 12, 2024

Don't the following satisfy your request:

?

@zanieb
Copy link
Member

zanieb commented Sep 12, 2024

This was addressed in #6834

@zanieb zanieb closed this as completed Sep 12, 2024
@zanieb zanieb added duplicate This issue or pull request already exists question Asking for clarification or support labels Sep 12, 2024
@pkucmus
Copy link
Author

pkucmus commented Sep 12, 2024

Sorry, I saw this but did not connect the dots that it's about that problem, for anyone else, #6834 (comment) this is a perfect solution.

@zanieb
Copy link
Member

zanieb commented Sep 13, 2024

No problem we can work on improving it. Is there anything in the docs that would be helpful to change?

@pkucmus
Copy link
Author

pkucmus commented Sep 13, 2024

Don't the following satisfy your request:

* `--system` flag:
  [docs.astral.sh/uv/reference/settings#pip_system](https://docs.astral.sh/uv/reference/settings/#pip_system)

* `UV_SYSTEM_PYTHON=true` environment variable:
  [docs.astral.sh/uv/configuration/environment](https://docs.astral.sh/uv/configuration/environment/)

?

Don't see the --system flag in 0.4.9 but I do see --python-preference=only-system
but then when I set ENV UV_PYTHON_PREFERENCE=only-system uv sync --frozen --no-install-project --no-dev still creates .venv
uv --system sync errors out error: unexpected argument '--system' found

@pkucmus
Copy link
Author

pkucmus commented Sep 13, 2024

@zanieb I'm currently looking into moving from pyenv, pipx, Poetry to uv and set uv as a company standard, I will explore more and can share my journey and/or feedback here, if that "Poetry user's journey" point of view would be at all helpful to you and your team working on uv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants