From 04ed7b38d9c93cfd0cbe30ce272eeb4e425cd412 Mon Sep 17 00:00:00 2001 From: Marius Lie Winger Date: Tue, 3 Sep 2024 10:26:26 +0200 Subject: [PATCH] fix: install uv from installer in Dockerfile --- api/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 2520612d..ca6314e4 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -5,10 +5,15 @@ EXPOSE 5000 ENV PYTHONUNBUFFERED=1 ENV PYTHONPATH=/code -ENV VIRTUAL_ENV=/code/.venv -ENV PATH="/code/.venv/bin:$PATH" +# ENV VIRTUAL_ENV=/code/.venv +# ENV PATH="/code/.venv/bin:$PATH" -COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv +# Install uv: The installer requires curl (and certificates) to download the release archive +RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates +ADD https://astral.sh/uv/0.4.3/install.sh /uv-installer.sh +RUN sh /uv-installer.sh && rm /uv-installer.sh +# Ensure the installed binary is on the `PATH` +ENV PATH="/root/.cargo/bin/:$PATH" COPY pyproject.toml pyproject.toml COPY uv.lock uv.lock