Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (45 loc) · 1.96 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (45 loc) · 1.96 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
# syntax=docker/dockerfile:1.7
FROM python:3.12-slim-bookworm
ARG TARGETPLATFORM
ARG TARGETARCH
LABEL org.opencontainers.image.title="Graphectory" \
org.opencontainers.image.description="Reproducible graph analysis for agentic software systems" \
org.opencontainers.image.source="https://github.com/Intelligent-CAT-Lab/Graphectory" \
org.opencontainers.image.documentation="https://github.com/Intelligent-CAT-Lab/Graphectory/blob/main/README.md"
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
MPLBACKEND=Agg \
HOME=/home/graphectory \
PATH="/home/graphectory/.local/bin:$PATH"
WORKDIR /opt/graphectory
# Install system dependencies for pygraphviz and scientific computing
# All packages available for linux/amd64 and linux/arm64 in Debian Bookworm
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
graphviz \
libgraphviz-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Copy project metadata and package structure for layer caching
COPY pyproject.toml README.md LICENSE ./
COPY graph_construction/__init__.py graph_construction/__init__.py
COPY graph_analysis/__init__.py graph_analysis/__init__.py
COPY lang_construction/__init__.py lang_construction/__init__.py
# Install Python dependencies
RUN python -m pip install --upgrade pip && \
python -m pip install --no-cache-dir .
# Copy remaining project files (data, plots, scripts)
COPY . .
# Create non-root user and directories
RUN useradd --create-home --uid 10001 --shell /bin/bash graphectory && \
mkdir -p /output /opt/graphectory/figures && \
# Shell scripts may be checked out with CRLF on Windows hosts.
sed -i 's/\r$//' scripts/*.sh && \
chown -R graphectory:graphectory \
/opt/graphectory /output /home/graphectory && \
chmod 0755 scripts/*.sh
USER graphectory
VOLUME ["/output"]
# Interactive shell by default; run `reproduce` for automated analysis
CMD ["bash"]