-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.app
More file actions
61 lines (45 loc) · 1.7 KB
/
Dockerfile.app
File metadata and controls
61 lines (45 loc) · 1.7 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
58
59
60
61
# Multi-stage Dockerfile for running mcpbr CLI
# This is NOT the task environment Dockerfile - see Dockerfile for that.
# This image packages the mcpbr benchmark runner itself.
# Stage 1: Build
FROM python:3.11-slim AS builder
WORKDIR /build
# Install build dependencies
RUN pip install --no-cache-dir build hatchling
# Copy project files
COPY pyproject.toml README.md LICENSE ./
COPY src/ src/
# Build the wheel
RUN python -m build --wheel --outdir /build/dist
# Stage 2: Runtime
FROM python:3.11-slim
LABEL maintainer="mcpbr Contributors"
LABEL org.opencontainers.image.source="https://github.com/greynewell/mcpbr"
LABEL org.opencontainers.image.description="MCP Benchmark Runner - evaluate MCP servers against software engineering benchmarks"
LABEL org.opencontainers.image.licenses="MIT"
# Install runtime system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN groupadd --gid 1000 mcpbr && \
useradd --uid 1000 --gid mcpbr --shell /bin/bash --create-home mcpbr
WORKDIR /home/mcpbr
# Install the built wheel from the builder stage
COPY --from=builder /build/dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl && \
rm -f /tmp/*.whl
# Copy entrypoint
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Create directories for configs and results
RUN mkdir -p /home/mcpbr/configs /home/mcpbr/results && \
chown -R mcpbr:mcpbr /home/mcpbr
# Switch to non-root user
USER mcpbr
# Mount points for user configs and results
VOLUME ["/home/mcpbr/configs", "/home/mcpbr/results"]
ENTRYPOINT ["entrypoint.sh"]
CMD ["--help"]