You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In docker environments, it's quite common to install all python packages to the system. Virtual environments are not needed because the current project is the only thing installed.
The docker documentation for UV recommends that you use the venv entrypoint for all container commands:
CMD ["/app/.venv/bin/python"]
However, this makes migrating to UV a bit harder when so many things already reference "python" directly in.
Also, using a virtual environment in these situations complicates the container, because devs now have to remember to use the .venv python always.
Would it be possible to install into the system during uv sync somehow. I assumed --python-preference only-system would do this, but that doesn't seem to prevent the creating of a virtual environment. uv pip install support --system, so its sort of strange that sync does not.
My current workaround is doing this in the dockerfile instead:
In docker environments, it's quite common to install all python packages to the system. Virtual environments are not needed because the current project is the only thing installed.
The docker documentation for UV recommends that you use the venv entrypoint for all container commands:
However, this makes migrating to UV a bit harder when so many things already reference "python" directly in.
Also, using a virtual environment in these situations complicates the container, because devs now have to remember to use the .venv python always.
Would it be possible to install into the system during
uv sync
somehow. I assumed--python-preference only-system
would do this, but that doesn't seem to prevent the creating of a virtual environment.uv pip install
support--system
, so its sort of strange thatsync
does not.My current workaround is doing this in the dockerfile instead:
The text was updated successfully, but these errors were encountered: