-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# syntax=docker/dockerfile:1
# Ollive platform — Python services (gateway, ingestion, worker).
# Build context: platform/ (workspace root)
# Override CMD per service in docker-compose.yml.
#
# Cache strategy:
# --mount=type=cache preserves uv's HTTP/wheel cache across builds so
# packages are downloaded once and reused. uv sync is still re-run on
# source changes but resolves instantly from cache (no network round-trips).
# Full source must be present before uv sync for editable workspace installs.
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
# Copy entire workspace — editable installs require source present at sync time
COPY pyproject.toml uv.lock ./
COPY core/ core/
COPY llmobs/ llmobs/
COPY beacon/ beacon/
COPY underwriter/ underwriter/
# Install dependencies — uv cache persists across builds via BuildKit mount
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
ENV PATH="/app/.venv/bin:$PATH"
CMD ["uvicorn", "beacon.gateway.main:app", "--host", "0.0.0.0", "--port", "8000"]