mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-06-30 00:45:14 +08:00
feat: add .venv to dockerignore and optimize Dockerfile with cache mounts for uv (#145)
Change-Id: I27ff2d4f9bcdedbd0135e109ecb6aa6d78bc488b
This commit is contained in:
parent
9dc78c3829
commit
d69128495b
@ -26,6 +26,7 @@ wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
.venv/
|
||||
|
||||
# Web
|
||||
node_modules
|
||||
|
@ -5,11 +5,18 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Pre-cache the application dependencies.
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --locked --no-install-project
|
||||
|
||||
# Copy the application into the container.
|
||||
COPY . /app
|
||||
|
||||
# Install the application dependencies.
|
||||
RUN uv sync --frozen --no-cache
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --locked
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user