Skip to content

Commit 4386989

Browse files
committed
devops: make build dir an argument
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
1 parent a1912c7 commit 4386989

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.devops/s390x.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GCC_VERSION=15.2.0
22
ARG DEBIAN_VERSION=12
3+
ARG BUILD_DIR=/app
34

45
FROM gcc:${GCC_VERSION} AS build
56

@@ -12,11 +13,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1213
libcurl4-openssl-dev libopenblas-openmp-dev && \
1314
rm -rf /var/lib/apt/lists/*
1415

15-
WORKDIR /app
16+
WORKDIR ${BUILD_DIR}
1617
COPY . .
1718

1819
RUN --mount=type=cache,target=/root/.ccache \
19-
--mount=type=cache,target=/app/build \
20+
--mount=type=cache,target=${BUILD_DIR}/build \
2021
cmake -S . -B build -G Ninja \
2122
-DCMAKE_BUILD_TYPE=Release \
2223
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
@@ -31,6 +32,7 @@ RUN --mount=type=cache,target=/root/.ccache \
3132
cmake --install build --prefix /opt/llama.cpp
3233

3334
# TODO: DOUBLE CHECK ALL FILES ARE COPIED INTO COLLECTOR
35+
# TODO: Switch to COPY operation instead for caching
3436
RUN cp *.py /opt/llama.cpp \
3537
&& cp -r gguf-py /opt/llama.cpp \
3638
&& cp -r requirements /opt/llama.cpp \

0 commit comments

Comments
 (0)