-
Notifications
You must be signed in to change notification settings - Fork 119
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
33 lines (25 loc) · 1.02 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
# ── Stage 1: Build frontend ──────────────────────────────────────
FROM node:20-alpine AS frontend
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci --ignore-scripts
COPY frontend/ ./
RUN npm run build
# ── Stage 2: Python runtime ─────────────────────────────────────
FROM python:3.12-slim AS runtime
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ && \
rm -rf /var/lib/apt/lists/*
COPY pyproject.toml ./
RUN pip install --no-cache-dir -e ".[postgresql]" && \
rm -rf /root/.cache/pip
COPY quantgpt/ ./quantgpt/
COPY scripts/ ./scripts/
COPY --from=frontend /app/frontend/dist ./frontend/dist
RUN mkdir -p data reports logs
EXPOSE 8003
ENV AUTH_DISABLED=true
ENV QUANTGPT_TASK_BACKEND=process
ENV QUANTGPT_WORKER_PROCESSES=2
CMD ["python", "-m", "quantgpt", "--transport", "http"]