Repository navigation
Expand file tree
/
Copy pathDockerfile.glama
More file actions
41 lines (33 loc) · 1.57 KB
/
Copy pathDockerfile.glama
File metadata and controls
41 lines (33 loc) · 1.57 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
# Dedicated Dockerfile for Glama MCP server evaluation and introspection
FROM python:3.15.2-slim@sha256:65a65fc7b30b06cb6df4930fd4650697cb23f4c2698ab81fc87e4b031bc36928
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
ENGRAPHIS_DB_PATH=/home/engraphis/engraphis.db \
ENGRAPHIS_STATE_DIR=/home/engraphis/.engraphis \
HF_HOME=/home/engraphis/.cache/huggingface \
ENGRAPHIS_MCP_WARMUP=0
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml README.md LICENSE NOTICE ./
COPY engraphis ./engraphis
COPY scripts ./scripts
COPY deploy ./deploy
# Install CPU-only PyTorch first so `.[mcp]` (which includes sentence-transformers)
# avoids downloading multi-gigabyte CUDA wheels during Glama's container build, and
# enforce the patched filelock security floor matching the main Dockerfile.
RUN pip install --upgrade pip "setuptools>=83" \
&& pip install --index-url https://download.pytorch.org/whl/cpu torch \
&& pip install --upgrade ".[mcp]" "filelock>=4.2.1,<5" \
&& rm -rf /root/.cache/pip \
/usr/local/lib/python3.15/site-packages/pip \
/usr/local/lib/python3.15/site-packages/pip-*.dist-info \
&& rm -f /usr/local/bin/pip /usr/local/bin/pip3 /usr/local/bin/pip3.15
RUN useradd --create-home --uid 10001 engraphis \
&& mkdir -p /home/engraphis/.engraphis /home/engraphis/.cache/huggingface \
&& chmod 700 /home/engraphis/.engraphis \
&& chown -R engraphis:engraphis /home/engraphis
USER engraphis
ENTRYPOINT ["engraphis-mcp"]