File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 55artefacts /
66src /
77! src /parserbench
8+ ! artefacts /prebuilt
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ FROM base as build
77WORKDIR /app
88
99# Add build argument for prebuilt binaries
10- ARG PREBUILT_BINS=false
10+ ARG BUILD_QUICK=false
11+ ENV BUILD_QUICK=${BUILD_QUICK}
1112
1213RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1314 --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
@@ -42,13 +43,15 @@ RUN --mount=type=cache,target=/root/.cache/pip \
4243 pip install --upgrade pip --break-system-packages && \
4344 pip install .[dev] --break-system-packages
4445
46+ RUN mkdir -p /app/artefacts
47+
4548COPY . .
4649
47- RUN --mount=type=cache,target=/app/artefacts \
48- if [ "$PREBUILT_BINS" = "false" ]; then \
50+ RUN if [ "$BUILD_QUICK" = "false" ]; then \
4951 invoke build-benchmarks; \
5052 else \
5153 echo "Using prebuilt binaries" ; \
54+ cp -r ./artefacts/prebuilt /app/artefacts/; \
5255 fi
5356
5457
Original file line number Diff line number Diff line change @@ -32,14 +32,13 @@ run-quick: fetch-binaries
3232 docker buildx build \
3333 --target runtime \
3434 --tag $(IMAGE_quick ) \
35- --build-arg PREBUILT_BINS =true \
35+ --build-arg QUICK_BUILD =true \
3636 --load .
3737 @test -f $(LOGFILE ) || touch $(LOGFILE )
3838 chmod a+w $(LOGFILE )
3939 docker run --rm -it \
4040 --mount type=bind,source=" $( LOGFILE) " ,target=/app/experiment.log \
4141 --mount type=bind,source=" $( RESULTS) " ,target=/app/results \
42- --mount type=bind,source=" $( PREBUILT_BIN) " ,target=/app/artefacts/bin \
4342 $(IMAGE_quick )
4443
4544run-full :
You can’t perform that action at this time.
0 commit comments