-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (45 loc) · 1.97 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (45 loc) · 1.97 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
# =============================================================================
# Compute container for the ADCS lifecycle demo.
#
# Emulates a remote execution server where Stage 2 (symbolic analysis) and
# Stage 3 (numerical simulation) would run in a production deployment.
# Captures execution metadata (hostname, image digest, container ID) into
# RTM provenance so the resulting attestations record WHERE and HOW each
# piece of evidence was produced — a load-bearing requirement when the
# engineer's machine and the compute server are different physical hosts.
#
# Build (one-time, by host orchestrator):
# docker build -t adcs-compute:latest -f compute/Dockerfile .
#
# Run (driven by --compute=docker on the pipeline):
# docker run --rm \
# -v $(pwd):/work \
# -w /work \
# adcs-compute:latest \
# uv run python -m compute.container_entry --stage symbolic
# =============================================================================
FROM python:3.12-slim
# System dependencies. scipy needs a few small native libs.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc g++ gfortran libopenblas-dev liblapack-dev && \
rm -rf /var/lib/apt/lists/*
# uv (matches host toolchain)
RUN pip install --no-cache-dir uv==0.5.4
WORKDIR /work
# Copy only what the analysis stages need (keeps the image small and
# avoids cache invalidation on unrelated edits).
COPY pyproject.toml uv.lock README.md ./
RUN uv sync --frozen --no-dev
# Copy the analysis and evidence packages plus their dependencies.
COPY analysis/ ./analysis/
COPY ontology/ ./ontology/
COPY structural/ ./structural/
COPY evidence/ ./evidence/
COPY compute/ ./compute/
# Image label: read at runtime by container_entry to confirm we are
# inside the expected image.
LABEL org.adcs-demo.role="compute"
LABEL org.adcs-demo.stage="analysis"
# Default to a no-op so the container is safe to inspect interactively.
CMD ["uv", "run", "python", "-m", "compute.container_entry", "--describe"]