-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 815 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (27 loc) · 815 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
34
35
36
37
# Build stage for Python SDK
FROM python:3.11-slim as builder
WORKDIR /app
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy source first (needed for build with src layout)
COPY pyproject.toml ./
COPY src ./src
RUN pip install build && python -m build
# Runtime stage
FROM python:3.11-slim
WORKDIR /app
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy builder output
COPY --from=builder /app/dist /app/dist
RUN pip install /app/dist/*.whl --force-reinstall
# Non-root user
RUN useradd -m -u 1000 nullrun
USER nullrun
# Install optional dependencies
RUN pip install "nullrun-breaker[langgraph]"
ENTRYPOINT ["python", "-m", "nullrun.breaker"]