Make uv sync use a specific venv when building

If not specifying it, it tries to write a `.venv` in the current dir which isn't writeable, and fails.
This commit is contained in:
Alexis Métaireau 2025-01-07 11:19:07 +01:00
parent fca1e863f9
commit 6b3dee58a3
No known key found for this signature in database
GPG key ID: C65C7A89A8FFC56E

View file

@ -182,8 +182,9 @@ ENV PATH="$PATH:/home/user/.local/bin"
RUN pipx install uv
COPY pyproject.toml uv.lock /home/user/dangerzone/
# XXX Not sure why, but permission problems with the command below. Commenting it out for now as `uv` will get the deps later on.
# RUN cd /home/user/dangerzone && uv venv .venv-{distro}-{version} && uv sync
RUN uv venv /home/user/.venv
ENV UV_PROJECT_ENVIRONMENT="/home/user/.venv"
RUN cd /home/user/dangerzone && uv sync
"""
DOCKERFILE_BUILD_DEBIAN_DEPS = r"""