-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (38 loc) · 1.77 KB
/
Copy pathDockerfile
File metadata and controls
50 lines (38 loc) · 1.77 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
# =============================================================================
# (c) Clearview Geographic LLC — All Rights Reserved | Est. 2018
# CVG Neuron — Artificial Intelligence Engine
# Author: Alex Zelenski, GISP | azelenski@clearviewgeographic.com
# =============================================================================
FROM python:3.13-slim AS base
LABEL maintainer="Alex Zelenski, GISP <azelenski@clearviewgeographic.com>"
LABEL org.opencontainers.image.title="CVG Neuron"
LABEL org.opencontainers.image.description="CVG Neuron — Artificial Intelligence Engine for Clearview Geographic LLC"
LABEL org.opencontainers.image.vendor="Clearview Geographic LLC"
LABEL org.opencontainers.image.licenses="Proprietary"
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
NEURON_DATA_DIR=/app/data
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
bash \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements-web.txt ./
RUN pip install --no-cache-dir -r requirements-web.txt
COPY . .
RUN pip install --no-cache-dir -e ".[web]"
# Data directory for persistent memory (episodic/semantic/procedural JSON)
RUN mkdir -p /app/data/memory
# Make entrypoint executable
RUN chmod +x /app/entrypoint.sh
RUN useradd -m -u 1001 neuron && \
chown -R neuron:neuron /app
USER neuron
EXPOSE 8095
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=5 \
CMD curl -fsS http://localhost:8095/health | python3 -c "import sys,json; d=json.load(sys.stdin); sys.exit(0 if d.get('status') in ('ok','operational') else 1)" || exit 1
# Entrypoint: register cvg-neuron model with Ollama, then start FastAPI
CMD ["/bin/bash", "/app/entrypoint.sh"]