File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 2626 - name : Build Frontend WebUI
2727 run : |
2828 cd lightrag_webui
29- bun install --frozen-lockfile --production
29+ bun install --frozen-lockfile
3030 bun run build
3131 cd ..
3232
Original file line number Diff line number Diff line change 1- # Build stage
1+ # Frontend build stage
2+ FROM oven/bun:1 AS frontend-builder
3+
4+ WORKDIR /app
5+
6+ # Copy frontend source code
7+ COPY lightrag_webui/ ./lightrag_webui/
8+
9+ # Build frontend
10+ RUN cd lightrag_webui && \
11+ bun install --frozen-lockfile && \
12+ bun run build
13+
14+ # Python build stage
215FROM python:3.12-slim AS builder
316
417WORKDIR /app
@@ -20,6 +33,9 @@ COPY pyproject.toml .
2033COPY setup.py .
2134COPY lightrag/ ./lightrag/
2235
36+ # Copy frontend build output from frontend-builder stage
37+ COPY --from=frontend-builder /app/lightrag/api/webui ./lightrag/api/webui
38+
2339# Install dependencies
2440ENV PATH="/root/.cargo/bin:${PATH}"
2541RUN pip install --user --no-cache-dir --use-pep517 .
@@ -42,7 +58,7 @@ RUN pip install --upgrade pip setuptools wheel
4258
4359# Copy only necessary files from builder
4460COPY --from=builder /root/.local /root/.local
45- COPY . /lightrag ./lightrag
61+ COPY --from=builder /app /lightrag ./lightrag
4662COPY setup.py .
4763
4864RUN pip install --use-pep517 ".[api]"
You can’t perform that action at this time.
0 commit comments