-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 846 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 846 Bytes
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
# Dockerfile
FROM python:3.10-slim as builder
WORKDIR /build
COPY pyproject.toml .
COPY src/ src/
# Build wheel package
RUN pip install --upgrade pip && \
pip wheel --no-cache-dir --no-deps --wheel-dir /build/wheels -e .
FROM python:3.10-slim
WORKDIR /app
# Establish non-root execution context for security
RUN useradd -m -s /bin/bash proxyuser
COPY --from=builder /build/wheels /wheels
COPY pyproject.toml .
COPY src/ src/
COPY examples/ examples/
RUN pip install --no-cache-dir pydantic pydantic-settings ollama python-dotenv && \
pip install --no-cache-dir /wheels/*
USER proxyuser
# Default configurations; overridden via docker run -e
ENV OLLAMA_API_BASE_URL="http://host.docker.internal:11434"
ENV PRIMARY_MODEL="gemma4:31b-cloud"
ENV JUDGE_MODEL="gemma4:31b-cloud"
CMD ["python", "examples/async_proxy_implementation.py"]