Skip to content

Commit

Permalink
fix: docker uv installation (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeall authored Nov 14, 2024
1 parent 6f9060b commit c7a4be5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/*
Expand All @@ -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
Expand Down

0 comments on commit c7a4be5

Please sign in to comment.