Skip to content

Commit 0c08651

Browse files
authored
Use /venv instead of /app/venv (#1475)
1 parent ce467d1 commit 0c08651

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ WORKDIR /app
1616
FROM base AS builder
1717

1818
ENV PATH="/root/.local/bin:${PATH}"
19-
ENV UV_PROJECT_ENVIRONMENT="/app/venv"
19+
ENV UV_PROJECT_ENVIRONMENT="/venv"
2020

2121
COPY pyproject.toml uv.lock ./
2222
RUN uv sync --frozen --no-install-project
@@ -25,14 +25,17 @@ RUN uv sync --frozen --no-install-project
2525
FROM base AS final
2626

2727
ENV PATH="/root/.local/bin:${PATH}"
28-
ENV VIRTUAL_ENV="/app/venv"
28+
ENV VIRTUAL_ENV="/venv"
2929

3030
WORKDIR /app
3131

32-
COPY --from=builder /app/venv /app/venv
32+
# Copy venv with dependencies
33+
COPY --from=builder /venv /venv
3334

35+
# Copy source code
3436
COPY . .
3537

36-
RUN /app/venv/bin/pip install --no-deps -e .
38+
# Install only the project (not dependencies)
39+
RUN /venv/bin/pip install --no-deps -e .
3740

38-
ENTRYPOINT ["/app/venv/bin/modelbench"]
41+
ENTRYPOINT ["/venv/bin/modelbench"]

0 commit comments

Comments
 (0)