Skip to content

Commit

Permalink
fix: install uv from installer in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuswinger committed Sep 3, 2024
1 parent 6f29e30 commit 04ed7b3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04ed7b3

Please sign in to comment.