-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (40 loc) · 1.87 KB
/
Dockerfile
File metadata and controls
56 lines (40 loc) · 1.87 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
54
55
56
# ═══════════════════════════════════════════════════════════════
# Cyber-Draco Legacy — NeuralVaultCore v1.0
# Docker image — multi-stage (Node UI + Python backend)
# Copyright (c) 2025-2026 getobyte — MIT License
# ═══════════════════════════════════════════════════════════════
# Stage 1: Build React UI
FROM node:20-slim AS ui-builder
WORKDIR /ui
COPY NVC-BaseUI/package*.json ./
RUN npm ci --production=false
COPY NVC-BaseUI/ ./
RUN npm run build
# Stage 2: Python backend
FROM python:3.12-slim
LABEL org.opencontainers.image.title="NeuralVaultCore"
LABEL org.opencontainers.image.version="1.0.0"
LABEL org.opencontainers.image.licenses="MIT"
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 nvc
WORKDIR /app
COPY pyproject.toml .
COPY core/ ./core/
COPY server.py nvc.py webui.py install.py ./
COPY hooks/ ./hooks/
# Install from pyproject.toml
RUN pip install --no-cache-dir ".[full]"
# Pre-download semantic search model when available. Runtime still works without it.
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')" || true
# Copy built UI from stage 1
COPY --from=ui-builder /webui-dist ./webui-dist/
RUN mkdir -p /data && chown -R nvc:nvc /data
USER nvc
ENV NVC_DB_PATH=/data/nvc.db
ENV NVC_PROFILE=remote-homelab
ENV NVC_PORT=9998
EXPOSE 9998 9999
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD curl -f http://localhost:${NVC_PORT:-9998}/health || exit 1
CMD ["python", "nvc.py", "serve", "--transport", "sse", "--host", "0.0.0.0", "--port", "9998"]