-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 749 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 749 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
FROM python:3.14-slim AS builder
WORKDIR /app
# System deps for scipy/scikit-learn wheel builds
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc g++ && \
rm -rf /var/lib/apt/lists/*
COPY pyproject.toml ./
COPY src/ ./src/
RUN pip install --no-cache-dir .
# --- Production ---
FROM python:3.14-slim
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.14/site-packages /usr/local/lib/python3.14/site-packages
COPY --from=builder /usr/local/bin/cuba-memorys /usr/local/bin/cuba-memorys
COPY --from=builder /app/src ./src
# Non-root user
RUN addgroup --system appgroup && adduser --system --group appuser
USER appuser
# DATABASE_URL must be provided at runtime
ENV DATABASE_URL=""
ENTRYPOINT ["cuba-memorys"]