-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (42 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
57 lines (42 loc) · 1.83 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
57
# =============================================================================
# LATRACE Memory Service - Minimal Runtime Dockerfile
# =============================================================================
# This image builds and runs only the standalone `modules.memory` service.
#
# It does not bundle Qdrant or Neo4j into the same container.
# For the recommended self-hosted setup, use:
# docker compose up --build
#
# Build:
# docker build -t latrace-ai .
#
# Run against external dependencies:
# docker run --rm -p 8000:8000 --env-file .env latrace-ai
# =============================================================================
FROM python:3.12-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:0.7.3 /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
WORKDIR /app
COPY pyproject.toml uv.lock README.md LICENSE NOTICE ./
RUN uv sync --frozen --no-dev
COPY modules/__init__.py modules/__init__.py
COPY modules/memory modules/memory
RUN uv sync --frozen --no-dev
FROM python:3.12-slim AS runtime
LABEL org.opencontainers.image.title="LATRACE Memory" \
org.opencontainers.image.description="Multimodal memory service for text, audio, image, and video with tenant-isolated graph retrieval." \
org.opencontainers.image.source="https://github.com/ZXXZ1000/LATRACE-AI" \
org.opencontainers.image.url="https://github.com/ZXXZ1000/LATRACE-AI" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="ZXXZ1000"
ENV PATH="/app/.venv/bin:${PATH}" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY --from=builder /app/.venv /app/.venv
COPY --from=builder /app/modules /app/modules
COPY README.md LICENSE NOTICE ./
EXPOSE 8000
CMD ["python", "-m", "uvicorn", "modules.memory.api.server:app", "--host", "0.0.0.0", "--port", "8000"]