-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (41 loc) · 1.56 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (41 loc) · 1.56 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
FROM python:3.12-slim
LABEL org.opencontainers.image.title="VTK MCP Gateway"
LABEL org.opencontainers.image.description="Production MCP gateway for VTK LLM tooling"
LABEL org.opencontainers.image.source="https://github.com/Kitware/vtk-mcp"
LABEL org.opencontainers.image.licenses="MIT"
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# VTK version to pre-cache at image build time
ARG VTK_VERSION=9.3.0
ENV VTK_MCP_VTK_VERSION=${VTK_VERSION}
WORKDIR /app
# Install uv for fast dependency installation
RUN pip install uv
# Install vtk-* sibling packages from GitHub (not on PyPI)
RUN uv pip install --system \
"git+https://github.com/vicentebolea/vtk-knowledge" \
"vtk-validate[translate] @ git+https://github.com/vicentebolea/vtk-validate"
# Install vtk-mcp with optional retrieval support
COPY . /app/
RUN uv pip install --system -e ".[retrieval]"
# Pre-download the vtk-knowledge JSONL artifact and vtk-index embedded
# Qdrant storage so the image is ready to serve without network access.
RUN python - <<'EOF'
import logging
logging.basicConfig(level=logging.INFO)
import os
vtk_version = os.environ["VTK_MCP_VTK_VERSION"]
from vtk_knowledge import VTKAPIIndex
VTKAPIIndex.from_artifact(vtk_version)
try:
from vtk_index import Retriever
Retriever.from_artifact(vtk_version)
except Exception as e:
logging.warning("vtk-index embedded storage skipped: %s", e)
EOF
ENV VTK_MCP_TRANSPORT=stdio
ENV VTK_MCP_ENABLE_VALIDATION=true
ENV VTK_MCP_ENABLE_RETRIEVAL=true
ENTRYPOINT ["python", "-m", "vtk_mcp"]