llama-server-vulkan.Dockerfile 843 B

1234567891011121314151617181920212223242526272829
  1. ARG UBUNTU_VERSION=jammy
  2. FROM ubuntu:$UBUNTU_VERSION as build
  3. # Install build tools
  4. RUN apt update && apt install -y git build-essential cmake wget
  5. # Install Vulkan SDK and cURL
  6. RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
  7. wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
  8. apt update -y && \
  9. apt-get install -y vulkan-sdk libcurl4-openssl-dev curl
  10. # Build it
  11. WORKDIR /app
  12. COPY . .
  13. RUN cmake -B build -DGGML_VULKAN=1 -DLLAMA_CURL=1 && \
  14. cmake --build build --config Release --target llama-server
  15. # Clean up
  16. WORKDIR /
  17. RUN cp /app/build/bin/llama-server /llama-server && \
  18. rm -rf /app
  19. ENV LC_ALL=C.utf8
  20. HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
  21. ENTRYPOINT [ "/llama-server" ]