main-intel.Dockerfile 644 B

1234567891011121314151617181920212223242526
  1. ARG ONEAPI_VERSION=2024.0.1-devel-ubuntu22.04
  2. ARG UBUNTU_VERSION=22.04
  3. FROM intel/hpckit:$ONEAPI_VERSION as build
  4. RUN apt-get update && \
  5. apt-get install -y git
  6. WORKDIR /app
  7. COPY . .
  8. # for some reasons, "-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DLLAMA_NATIVE=ON" give worse performance
  9. RUN mkdir build && \
  10. cd build && \
  11. cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx && \
  12. cmake --build . --config Release --target main server
  13. FROM ubuntu:$UBUNTU_VERSION as runtime
  14. COPY --from=build /app/build/bin/main /main
  15. COPY --from=build /app/build/bin/server /server
  16. ENV LC_ALL=C.utf8
  17. ENTRYPOINT [ "/main" ]