mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
* fix: copy package includes in Docker build * fix: copy package includes in GPU Docker builds too PR #450 fixed the CPU Dockerfile but Dockerfile.gpu and Dockerfile.gpu.rocm have the identical bug: they COPY src/ then `uv pip install ".[server]"` without copying the non-src force-include paths (scripts/install, deploy/windows), so hatchling's wheel build fails the same way on GPU images (#447). Adds the two COPY lines to both GPU Dockerfiles and generalizes the regression test to guard every wheel-building Dockerfile (CPU + both GPU variants) instead of only the CPU one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Jon Saad-Falcon <41205309+jonsaadfalcon@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
Docker
43 lines
1.1 KiB
Docker
# Stage 1: Build frontend SPA
|
|
FROM node:22-slim AS frontend
|
|
|
|
WORKDIR /frontend
|
|
COPY frontend/package.json frontend/package-lock.json* ./
|
|
RUN npm ci --ignore-scripts 2>/dev/null || npm install
|
|
COPY frontend/ .
|
|
RUN npm run build
|
|
|
|
# Stage 2: Build Python package (NVIDIA CUDA 12.4)
|
|
FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 AS builder
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends python3 python3-pip python3-venv && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY pyproject.toml README.md ./
|
|
COPY src/ src/
|
|
COPY scripts/install scripts/install
|
|
COPY deploy/windows deploy/windows
|
|
|
|
COPY --from=frontend /src/openjarvis/server/static src/openjarvis/server/static/
|
|
|
|
RUN pip install --no-cache-dir uv && \
|
|
uv pip install --system ".[server]"
|
|
|
|
# Stage 3: Runtime
|
|
FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends python3 python3-pip && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /usr/local /usr/local
|
|
COPY --from=builder /app /app
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["jarvis"]
|
|
CMD ["serve", "--host", "0.0.0.0", "--port", "8000"]
|