2024-11-15 11:10:45 +00:00
|
|
|
ARG ONEAPI_VERSION=2025.0.0-0-devel-ubuntu22.04
|
2024-01-23 07:11:39 +00:00
|
|
|
|
2024-07-17 18:21:55 +00:00
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION AS build
|
2024-01-23 07:11:39 +00:00
|
|
|
|
2024-06-26 16:32:07 +00:00
|
|
|
ARG GGML_SYCL_F16=OFF
|
2024-01-23 07:11:39 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y git
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2024-06-26 16:32:07 +00:00
|
|
|
RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \
|
|
|
|
echo "GGML_SYCL_F16 is set" && \
|
|
|
|
export OPT_SYCL_F16="-DGGML_SYCL_F16=ON"; \
|
2024-02-02 07:56:31 +00:00
|
|
|
fi && \
|
2024-07-24 13:36:00 +00:00
|
|
|
echo "Building with static libs" && \
|
|
|
|
cmake -B build -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
|
|
|
|
${OPT_SYCL_F16} -DBUILD_SHARED_LIBS=OFF && \
|
2024-06-12 23:41:52 +00:00
|
|
|
cmake --build build --config Release --target llama-cli
|
2024-01-23 07:11:39 +00:00
|
|
|
|
2024-07-17 18:21:55 +00:00
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION AS runtime
|
2024-01-23 07:11:39 +00:00
|
|
|
|
2024-06-12 23:41:52 +00:00
|
|
|
COPY --from=build /app/build/bin/llama-cli /llama-cli
|
2024-01-23 07:11:39 +00:00
|
|
|
|
|
|
|
ENV LC_ALL=C.utf8
|
|
|
|
|
2024-06-12 23:41:52 +00:00
|
|
|
ENTRYPOINT [ "/llama-cli" ]
|