Skip to content

Commit

Permalink
Use cache mounts during uv sync operations (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Aug 27, 2024
1 parent 7d44dd2 commit 1e5fa4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ ADD .dockerignore .
WORKDIR /app
ADD uv.lock /app/uv.lock
ADD pyproject.toml /app/pyproject.toml
RUN uv sync --frozen --no-install-project
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project

# Then, install the rest of the project
ADD . /app
RUN uv sync --frozen
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"
Expand Down

0 comments on commit 1e5fa4d

Please sign in to comment.