-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.test
More file actions
54 lines (42 loc) · 1.9 KB
/
Copy pathDockerfile.test
File metadata and controls
54 lines (42 loc) · 1.9 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
# MemoryLayer Embed Server — lightweight test image
#
# Build context: repo root (scitrera-memorylayer-ai-cc/)
# docker build -f oss/memorylayer-embed-server/Dockerfile.test -t memorylayer-embed-server:test .
#
# Purpose: docker-compose integration test alongside memorylayer-server.
# Uses the deterministic mock embedding providers (no torch, no CUDA, no
# model downloads) so the chain memorylayer-server → memorylayer-embed-server
# can be exercised in CI without GPUs.
#
# Plain HTTP only — sidecar is disabled via ``EMBED_SERVER_RUN_SIDECAR=false``
# (see scripts/entrypoint.sh).
FROM python:3.12-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive
# Curl is only needed for the HEALTHCHECK below; keep the image small.
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 65532 memorylayer && \
useradd --uid 65532 --gid memorylayer --create-home memorylayer
# Install uv for fast resolution; same convention as the production image.
RUN pip install --no-cache-dir uv==0.9.17
# Copy source packages
COPY oss/memorylayer-core-python /src/memorylayer-core-python
COPY oss/memorylayer-embed-server /src/memorylayer-embed-server
# Aether client is required by both packages but only needs the pure-Python
# parts; install from PyPI so we skip the protobuf-gen / Go build path.
RUN uv pip install --system --no-cache \
/src/memorylayer-core-python \
/src/memorylayer-embed-server
WORKDIR /app
USER memorylayer
# Mock-provider mode + plain-HTTP entrypoint.
ENV EMBED_SERVER_RUN_SIDECAR=false \
MEMORYLAYER_EMBED_USE_MOCK_PROVIDERS=true \
MEMORYLAYER_EMBED_PRELOAD_MODELS=false
EXPOSE 61051
HEALTHCHECK --interval=5s --timeout=3s --start-period=10s --retries=5 \
CMD curl -fsS http://localhost:61051/health || exit 1
ENTRYPOINT ["memorylayer-embed", "serve"]