-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (25 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (25 loc) · 1.03 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
# Build + test the pure-C LocalVQE port on Debian with OpenBLAS.
# Works for linux/amd64 and linux/arm64 (buildx --platform).
#
# docker build -t localvqe-c .
# # run the regression test with model + fixtures mounted from the reference repo:
# docker run --rm \
# -v /path/to/LocalVQE/ggml:/ref:ro \
# localvqe-c \
# ctest --test-dir /src/build --output-on-failure
FROM debian:bookworm-slim
# Only a C toolchain + cmake. No BLAS: the port is dependency-free by default
# (add libopenblas-dev + configure -DLOCALVQE_USE_BLAS=ON only if you want it).
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY CMakeLists.txt ./
COPY src ./src
COPY test ./test
# Reference fixtures are mounted at /ref at run time (read-only).
RUN cmake -S . -B build \
-DLOCALVQE_REF_DIR=/ref \
-DCMAKE_BUILD_TYPE=Release \
&& cmake --build build -j"$(nproc)"
CMD ["ctest", "--test-dir", "/src/build", "--output-on-failure"]