-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.79 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (30 loc) · 1.79 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
30
31
32
33
34
35
36
37
38
39
40
# 25.10 ships with Arc drivers
FROM ubuntu:25.10
ENV DEBIAN_FRONTEND=noninteractive
# Change the default shell to bash so we can source scripts natively
SHELL ["/bin/bash", "-c"]
# Install Compute Runtimes and Basekit
# https://dgpu-docs.intel.com/driver/client/overview.html
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-2/cpp-apt.html
RUN apt-get update && apt-get install -y software-properties-common wget gnupg2 \
&& add-apt-repository -y ppa:kobuk-team/intel-graphics \
&& wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
libze-intel-gpu1 libze1 intel-metrics-discovery intel-opencl-icd clinfo intel-gsc libze-dev intel-ocloc \
intel-cpp-essentials cmake pkg-config build-essential libssl-dev git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ARG LLAMA_CPP_VERSION=master
# Clone and Compile
# https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/SYCL.md
RUN git clone --depth 1 --branch ${LLAMA_CPP_VERSION} https://github.com/ggml-org/llama.cpp . && \
source /opt/intel/oneapi/setvars.sh && \
cmake -B build -DGGML_SYCL=ON -DGGML_SYCL_TARGET=INTEL -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON -DLLAMA_OPENSSL=ON && \
cmake --build build --config Release -j $(nproc)
# Intel Arc stability flag
ENV ZES_ENABLE_SYSMAN=1
EXPOSE 8080
# Execution
ENTRYPOINT ["/bin/bash", "-c", "source /opt/intel/oneapi/setvars.sh && exec /app/build/bin/llama-server \"$@\"", "--"]