server-vulkan.Dockerfile 803 B

12345678910111213141516171819202122232425262728293031
  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
  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
  10. # Install cURL
  11. RUN apt-get update && \
  12. apt-get install -y libcurl4-openssl-dev
  13. # Build it
  14. WORKDIR /app
  15. COPY . .
  16. RUN cmake -B build -DLLAMA_VULKAN=1 -DLLAMA_CURL=1 && \
  17. cmake --build build --config Release --target server
  18. # Clean up
  19. WORKDIR /
  20. RUN cp /app/build/bin/server /server && \
  21. rm -rf /app
  22. ENV LC_ALL=C.utf8
  23. ENTRYPOINT [ "/server" ]