Update dockerfile to remove blas and retain compilation with intel dpcpp
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
238d2e0290
commit
71b4e2f9ca
2 changed files with 4 additions and 14 deletions
13
Dockerfile
13
Dockerfile
|
@ -7,20 +7,15 @@ RUN apt update && \
|
|||
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
|
||||
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 && \
|
||||
apt update && \
|
||||
apt install intel-oneapi-mkl -y --no-install-recommends
|
||||
|
||||
RUN apt install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel gcc g++ pkg-config cmake -y --no-install-recommends && \
|
||||
apt install intel-oneapi-mkl intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel gcc g++ pkg-config cmake -y --no-install-recommends && \
|
||||
. /opt/intel/oneapi/setvars.sh && \
|
||||
export CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_NATIVE=1 -DLLAMA_LTO=1 -DLLAMA_BLAS_VENDOR=Intel10_64lp -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx" && \
|
||||
export CMAKE_ARGS="-DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_AR=xiar -DCMAKE_CXX_FLAGS=-fuse-ld=lld -DCMAKE_C_FLAGS=-fuse-ld=lld" && \
|
||||
export FORCE_CMAKE=1 && \
|
||||
pip install git+https://git.baalajimaestro.me/baalajimaestro/llama.cpp.git fastapi uvicorn sse-starlette pydantic-settings starlette-context && \
|
||||
apt remove intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel gcc g++ pkg-config cmake -y && \
|
||||
apt remove intel-oneapi-mkl intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel gcc g++ pkg-config cmake apt-utils git software-properties-common gnupg -y && \
|
||||
apt autoremove -y
|
||||
|
||||
ADD entrypoint.sh /
|
||||
|
||||
EXPOSE 8000
|
||||
ENV HOST 0.0.0.0
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
ENTRYPOINT ["python", "-m", "llama_cpp.server"]
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
python -m llama_cpp.server $@
|
||||
|
Loading…
Reference in a new issue