srini
09/09/2025, 4:01 PMFROM ghcr.io/astral-sh/uv:python3.12-bookworm AS base
WORKDIR /backend
# Copy configuration files
COPY pyproject.toml uv.lock ./
# UV_COMPILE_BYTECODE for generating .pyc files -> faster application startup.
# UV_LINK_MODE=copy to silence warnings about not being able to use hard links
# since the cache and sync target are on separate file systems.
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=/backend/uv.lock \
--mount=type=bind,source=pyproject.toml,target=/backend/pyproject.toml \
uv sync --frozen --no-dev
# Copy source code
COPY app /backend/app
FROM python:3.12.8-slim AS final
EXPOSE 8000
# PYTHONUNBUFFERED=1 to disable output buffering
ENV PYTHONUNBUFFERED=1
ARG VERSION=0.1.0
ENV APP_VERSION=$VERSION
WORKDIR /backend
# Copy the virtual environment from the base stage
COPY --from=base /backend /backend
# Add virtual environment to PATH
ENV PATH="/backend/venv/bin:$PATH"
RUN baml-cli generate --from /backend/app/
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]Vaibhav (BAML 🐑)
09/09/2025, 4:29 PMRUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=/backend/uv.lock \
--mount=type=bind,source=pyproject.toml,target=/backend/pyproject.toml \
this line is likely not doing what you think it is