Dockerfile.xpu 1.5 KB

123456789101112131415161718192021222324252627282930
  1. FROM intel/oneapi-basekit:2024.2.1-0-devel-ubuntu22.04
  2. 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 && \
  3. 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 && \
  4. chmod 644 /usr/share/keyrings/intel-oneapi-archive-keyring.gpg && \
  5. wget -O- https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor | tee /usr/share/keyrings/intel-graphics.gpg > /dev/null && \
  6. 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 && \
  7. chmod 644 /usr/share/keyrings/intel-graphics.gpg
  8. RUN apt-get update -y \
  9. && apt-get install -y curl libicu70 lsb-release git wget vim numactl python3 python3-pip ffmpeg libsm6 libxext6 libgl1
  10. RUN git clone https://github.com/intel/pti-gpu && \
  11. cd pti-gpu/sdk && \
  12. mkdir build && \
  13. cd build && \
  14. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake -DBUILD_TESTING=OFF .. && \
  15. make -j && \
  16. cmake --install . --config Release --prefix "/usr/local"
  17. COPY ./ /workspace/aphrodite-engine
  18. WORKDIR /workspace/aphrodite-engine
  19. RUN pip install -v -r requirements-xpu.txt
  20. RUN APHRODITE_TARGET_DEVICE=xpu python3 setup.py develop
  21. RUN pip install triton
  22. CMD ["/bin/bash"]