-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (29 loc) · 1.51 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (29 loc) · 1.51 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
FROM python:3.13-slim-bookworm@sha256:8092ae2ef67061f9db412458dbdce44dbf16748fb3cae5cdbd020f467a9712d0 AS waveform_base
LABEL authors="Stephen Thompson, Jeremy Stein"
# Cron is really small. For the sake of not having to reinstall it all the time,
# put it on both images even though we only need it on exporter.
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install --yes --no-install-recommends cron && \
apt-get autoremove --yes && apt-get clean --yes && rm -rf /var/lib/apt/lists/*
# uv image label "0.12.5"
COPY --from=ghcr.io/astral-sh/uv@sha256:e85be844203885286c60ffad8a858d48afb6c5a5c237ca0e67f12e74b8f174b1 /uv /uvx /bin/
ARG UVCACHE=/root/.cache/uv
COPY PIXL /PIXL
WORKDIR /app
COPY waveform-controller/pyproject.toml waveform-controller/uv.lock /app/
RUN --mount=type=cache,target=${UVCACHE} uv pip install --system .
COPY waveform-controller/. /app/
RUN --mount=type=cache,target=${UVCACHE} uv pip install --system .
# Optional: only for integration-test image builds (compose/build-arg INSTALL_COVERAGE=1).
# Editable install so imports resolve under /app/src (matches source=["src"] for coverage).
# coverage.py is inert unless COVERAGE_PROCESS_START is set.
ARG INSTALL_COVERAGE=0
RUN --mount=type=cache,target=${UVCACHE} \
if [ "$INSTALL_COVERAGE" = "1" ]; then \
uv pip install --system -e '.[coverage]'; \
fi
FROM waveform_base AS waveform_controller
CMD ["emap-extract-waveform"]
FROM waveform_base AS waveform_exporter
ENTRYPOINT ["/app/exporter-scripts/entrypoint.sh"]