-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
56 lines (44 loc) · 1.8 KB
/
Copy pathContainerfile
File metadata and controls
56 lines (44 loc) · 1.8 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
FROM ghcr.io/astral-sh/uv:0.11.32-python3.14-trixie-slim
ARG VERSION=0.1.0
ARG REVISION=unknown
ARG SOURCE=https://github.com/Artemon-line/ai-memory-hub
LABEL org.opencontainers.image.title="ai-memory-hub" \
org.opencontainers.image.description="Local-first deterministic memory ingestion hub with FastAPI and MCP interfaces" \
org.opencontainers.image.source="${SOURCE}" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.licenses="MIT"
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
HOME=/tmp \
UV_CACHE_DIR=/app/.uv-cache
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bsdutils=1:2.41.5-0+deb13u1 \
libblkid1=2.41.5-0+deb13u1 \
liblastlog2-2=2.41.5-0+deb13u1 \
libmount1=2.41.5-0+deb13u1 \
libsmartcols1=2.41.5-0+deb13u1 \
libuuid1=2.41.5-0+deb13u1 \
login=1:4.16.0-2+really2.41.5-0+deb13u1 \
mount=2.41.5-0+deb13u1 \
util-linux=2.41.5-0+deb13u1 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml uv.lock README.md ./
RUN uv sync --frozen --no-dev --no-install-project
COPY memory ./memory
COPY examples/container/config.yaml /app/config.yaml
RUN uv sync --frozen --no-dev && \
test -x /app/.venv/bin/aim && \
/app/.venv/bin/python -c "import memory; from memory.cli import main; assert callable(main)" && \
mkdir -p /app/data /app/logs /app/.uv-cache && \
useradd --uid 1001 --gid 0 --home-dir /tmp --no-create-home \
--shell /usr/sbin/nologin ai-memory-hub && \
chgrp -R 0 /app && \
chmod -R g=u /app && \
chown -R 1001:0 /app/.uv-cache && \
chmod -R g=u /app/.uv-cache
EXPOSE 8000
USER 1001
CMD ["/app/.venv/bin/aim", "serve", "--host", "0.0.0.0", "--port", "8000"]