Skip to content

Commit 3cf42fb

Browse files
committed
Update Dockerfile to optionally use prebuilt binaries
1 parent 319d12d commit 3cf42fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ FROM debian:latest as base
66
FROM base as build
77
WORKDIR /app
88

9+
# Add build argument for prebuilt binaries
10+
ARG PREBUILT_BINS=false
11+
912
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1013
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
1114
rm -f /etc/apt/apt.conf.d/docker-clean && \
@@ -42,7 +45,12 @@ RUN --mount=type=cache,target=/root/.cache/pip \
4245
COPY . .
4346

4447
RUN --mount=type=cache,target=/app/artefacts \
45-
invoke build-benchmarks
48+
if [ "$USE_PREBUILT_BINARIES" = "false" ]; then \
49+
invoke build-benchmarks; \
50+
else \
51+
echo "Using prebuilt binaries"; \
52+
fi
53+
4654

4755
FROM scratch as log_export
4856
COPY --from=build /app/experiment.log /docker-run-full.log

0 commit comments

Comments
 (0)