2024-06-12 11:05:35 +02:00
|
|
|
ARG ONEAPI_VERSION=2024.1.1-devel-ubuntu22.04
|
2024-01-28 08:55:31 +01:00
|
|
|
|
2024-07-17 20:21:55 +02:00
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION AS build
|
2024-01-28 08:55:31 +01:00
|
|
|
|
2024-06-26 18:32:07 +02:00
|
|
|
ARG GGML_SYCL_F16=OFF
|
2024-01-28 08:55:31 +01:00
|
|
|
RUN apt-get update && \
|
2024-04-04 18:31:22 +02:00
|
|
|
apt-get install -y git libcurl4-openssl-dev
|
2024-01-28 08:55:31 +01:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2024-06-26 18:32:07 +02: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 08:56:31 +01:00
|
|
|
fi && \
|
2024-07-24 15:36:00 +02:00
|
|
|
echo "Building with dynamic libs" && \
|
2024-06-26 18:32:07 +02:00
|
|
|
cmake -B build -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DLLAMA_CURL=ON ${OPT_SYCL_F16} && \
|
2024-06-13 01:41:52 +02:00
|
|
|
cmake --build build --config Release --target llama-server
|
2024-02-02 08:56:31 +01:00
|
|
|
|
2024-07-17 20:21:55 +02:00
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION AS runtime
|
2024-01-28 08:55:31 +01:00
|
|
|
|
2024-04-04 18:31:22 +02:00
|
|
|
RUN apt-get update && \
|
2024-06-25 17:13:27 +02:00
|
|
|
apt-get install -y libcurl4-openssl-dev curl
|
2024-04-04 18:31:22 +02:00
|
|
|
|
2024-06-13 01:41:52 +02:00
|
|
|
COPY --from=build /app/build/bin/llama-server /llama-server
|
2024-01-28 08:55:31 +01:00
|
|
|
|
|
|
|
ENV LC_ALL=C.utf8
|
2024-08-27 11:07:01 +02:00
|
|
|
# Must be set to 0.0.0.0 so it can listen to requests from host machine
|
|
|
|
ENV LLAMA_ARG_HOST=0.0.0.0
|
2024-01-28 08:55:31 +01:00
|
|
|
|
2024-06-25 17:13:27 +02:00
|
|
|
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
|
|
|
|
|
2024-06-13 01:41:52 +02:00
|
|
|
ENTRYPOINT [ "/llama-server" ]
|