mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 06:39:25 +01:00
3854c9d07f
* Update main-intel.Dockerfile * workaround for https://github.com/intel/oneapi-containers/issues/70 * reset intel docker in CI * add missed in server
35 lines
1.5 KiB
Docker
35 lines
1.5 KiB
Docker
ARG ONEAPI_VERSION=2024.0.1-devel-ubuntu22.04
|
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION as build
|
|
|
|
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/intel-oneapi-archive-keyring.gpg > /dev/null && \
|
|
echo "deb [signed-by=/usr/share/keyrings/intel-oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main " | tee /etc/apt/sources.list.d/oneAPI.list && \
|
|
chmod 644 /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
|
|
rm /etc/apt/sources.list.d/intel-graphics.list && \
|
|
wget -O- https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor | tee /usr/share/keyrings/intel-graphics.gpg > /dev/null && \
|
|
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc" | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
|
|
chmod 644 /usr/share/keyrings/intel-graphics.gpg
|
|
|
|
ARG LLAMA_SYCL_F16=OFF
|
|
RUN apt-get update && \
|
|
apt-get install -y git
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN if [ "${LLAMA_SYCL_F16}" = "ON" ]; then \
|
|
echo "LLAMA_SYCL_F16 is set" && \
|
|
export OPT_SYCL_F16="-DLLAMA_SYCL_F16=ON"; \
|
|
fi && \
|
|
cmake -B build -DLLAMA_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ${OPT_SYCL_F16} && \
|
|
cmake --build build --config Release --target main
|
|
|
|
FROM intel/oneapi-basekit:$ONEAPI_VERSION as runtime
|
|
|
|
COPY --from=build /app/build/bin/main /main
|
|
|
|
ENV LC_ALL=C.utf8
|
|
|
|
ENTRYPOINT [ "/main" ]
|