2024-05-23 20:59:10 -07:00
|
|
|
FROM ubuntu:22.04
|
2024-07-31 21:45:50 -07:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2024-04-29 17:19:07 -07:00
|
|
|
ENV TZ=america/los_angeles
|
|
|
|
|
2024-07-31 21:45:50 -07:00
|
|
|
# Base packages
|
2024-05-23 20:59:10 -07:00
|
|
|
RUN apt update && \
|
|
|
|
apt install --no-install-recommends -q -y \
|
2024-04-29 17:19:07 -07:00
|
|
|
software-properties-common \
|
2024-05-23 20:59:10 -07:00
|
|
|
ca-certificates \
|
2024-04-29 17:19:07 -07:00
|
|
|
gnupg \
|
2024-05-10 19:29:28 -07:00
|
|
|
wget \
|
2024-07-31 21:45:50 -07:00
|
|
|
curl \
|
2024-08-16 22:41:15 -07:00
|
|
|
python3 \
|
|
|
|
python3-pip \
|
2024-07-31 21:45:50 -07:00
|
|
|
ocl-icd-libopencl1
|
|
|
|
|
|
|
|
# Intel GPU compute user-space drivers
|
|
|
|
RUN mkdir -p /tmp/gpu && \
|
|
|
|
cd /tmp/gpu && \
|
2024-10-24 15:59:10 +01:00
|
|
|
wget https://github.com/oneapi-src/level-zero/releases/download/v1.18.3/level-zero_1.18.3+u22.04_amd64.deb && \
|
|
|
|
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-core_1.0.17791.9_amd64.deb && \
|
|
|
|
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-opencl_1.0.17791.9_amd64.deb && \
|
|
|
|
wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-level-zero-gpu_1.6.31294.12_amd64.deb && \
|
|
|
|
wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-opencl-icd_24.39.31294.12_amd64.deb && \
|
|
|
|
wget https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/libigdgmm12_22.5.2_amd64.deb && \
|
2024-05-23 20:59:10 -07:00
|
|
|
dpkg -i *.deb && \
|
2024-07-31 21:45:50 -07:00
|
|
|
rm *.deb
|
2024-05-23 20:59:10 -07:00
|
|
|
|
|
|
|
# Required compute runtime level-zero variables
|
|
|
|
ENV ZES_ENABLE_SYSMAN=1
|
2024-04-29 17:19:07 -07:00
|
|
|
|
2024-07-31 21:45:50 -07:00
|
|
|
# oneAPI
|
2024-04-29 17:19:07 -07:00
|
|
|
RUN wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
|
2024-05-23 20:59:10 -07:00
|
|
|
gpg --dearmor --output /usr/share/keyrings/oneapi-archive-keyring.gpg && \
|
2024-04-29 17:19:07 -07:00
|
|
|
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \
|
2024-05-23 20:59:10 -07:00
|
|
|
tee /etc/apt/sources.list.d/oneAPI.list && \
|
|
|
|
apt update && \
|
|
|
|
apt install --no-install-recommends -q -y \
|
2024-08-16 22:41:15 -07:00
|
|
|
intel-basekit
|
2024-04-29 17:19:07 -07:00
|
|
|
|
2024-05-23 20:59:10 -07:00
|
|
|
# Required oneAPI environment variables
|
2024-04-29 17:19:07 -07:00
|
|
|
ENV USE_XETLA=OFF
|
|
|
|
ENV SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
|
|
|
|
ENV SYCL_CACHE_PERSISTENT=1
|
|
|
|
|
2024-08-16 22:41:15 -07:00
|
|
|
COPY _init.sh /usr/share/lib/init_workspace.sh
|
|
|
|
COPY _run.sh /usr/share/lib/run_workspace.sh
|
|
|
|
|
|
|
|
# Ollama via ipex-llm
|
|
|
|
RUN pip3 install --pre --upgrade ipex-llm[cpp]
|
2024-05-23 20:59:10 -07:00
|
|
|
|
|
|
|
ENV OLLAMA_NUM_GPU=999
|
2024-07-31 21:45:50 -07:00
|
|
|
ENV OLLAMA_HOST=0.0.0.0:11434
|
|
|
|
|
2024-08-16 22:41:15 -07:00
|
|
|
ENTRYPOINT ["/bin/bash", "/usr/share/lib/run_workspace.sh"]
|
2024-04-29 17:19:07 -07:00
|
|
|
|