From c7a4be525e34c523325af25c582c76e941296df3 Mon Sep 17 00:00:00 2001 From: Felipe Allegretti Date: Thu, 14 Nov 2024 22:57:17 +0100 Subject: [PATCH] fix: docker uv installation (#23) --- Dockerfile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0b0f28..70fcdc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,8 @@ FROM python:3.9.16-slim-buster -# Update, install curl & tesseract, clean up +# Update, tesseract, clean up RUN apt-get update \ - && apt-get install -y \ - curl \ + && apt-get install -y --no-install-recommends \ tesseract-ocr \ && apt clean \ && rm -rf /var/lib/apt/lists/* @@ -13,15 +12,13 @@ ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONPATH "${PYTHONPATH}:/app" -# Install uv -ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh -RUN chmod +x /install.sh -RUN /install.sh && rm /install.sh - # Install dependencies WORKDIR /app COPY requirements.txt ./ -RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt +RUN --mount=from=ghcr.io/astral-sh/uv,source=/uv,target=/bin/uv \ + uv pip install --system --no-cache -r requirements.txt + +# Copy app files COPY . ./ # Run app