mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 05:12:26 +00:00
* feat: nvidia gpu config for docker * refactor: split NVIDIA GPU support into compose override Address review feedback: - Revert --engine ollama from base Dockerfile CMD (breaks non-Ollama users) - Keep bookworm pin and OLLAMA_HOST fix in base config - Move GPU-specific config (/proc, /sys mounts, deploy.resources.reservations) into new docker-compose.gpu.nvidia.yml override, matching the existing ROCm pattern (docker-compose.gpu.rocm.yml) - Restore Ollama port to standard 11434 - Remove commented-out GPU blocks from base docker-compose.yml - Add Ollama healthcheck with depends_on condition to base compose - Remove run.sh from repo root - Rewrite README Docker section to document CPU, NVIDIA, and ROCm patterns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Jon Saad-Falcon <41205309+jonsaadfalcon@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
807 B
Docker
34 lines
807 B
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
|
|
FROM python:3.12-slim-bookworm AS builder
|
|
|
|
WORKDIR /app
|
|
COPY pyproject.toml README.md ./
|
|
COPY src/ src/
|
|
|
|
# Copy built frontend into the server static directory
|
|
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 python:3.12-slim-bookworm
|
|
|
|
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"]
|