-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (46 loc) · 1.44 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (46 loc) · 1.44 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM python:3.11-slim AS base-sys
# System deps (lean but sufficient for faiss-cpu, transformers, etc.)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
jq \
ca-certificates \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Install sops from official release (apt package may not exist on slim images)
ARG SOPS_VERSION=3.8.1
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \
case "$arch" in \
amd64) SOPS_ARCH=amd64 ;; \
arm64) SOPS_ARCH=arm64 ;; \
*) echo "Unsupported arch: $arch"; exit 1 ;; \
esac; \
curl -fsSL -o /usr/local/bin/sops \
"https://github.com/getsops/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux.${SOPS_ARCH}"; \
chmod +x /usr/local/bin/sops; \
sops --version
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
RAG_ROOT=/app \
LANG=C.UTF-8
WORKDIR /app
# Common data dirs (also created at runtime if missing)
RUN mkdir -p data_raw data_processed storage output exports outlines data_jobs
# --- Python dependencies layer ---
FROM base-sys AS py-deps
WORKDIR /app
COPY requirements.txt ./
RUN pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt
# --- Final runtime image ---
FROM py-deps AS runner
WORKDIR /app
COPY . .
COPY docker/entrypoint.sh docker/entrypoint.sh
RUN chmod +x docker/entrypoint.sh
ENTRYPOINT ["/app/docker/entrypoint.sh"]
CMD ["--help"]