2024-02-02 07:56:31 +00:00
|
|
|
ARG UBUNTU_VERSION=jammy
|
|
|
|
|
|
|
|
FROM ubuntu:$UBUNTU_VERSION as build
|
|
|
|
|
|
|
|
# Install build tools
|
2024-06-06 05:17:21 +00:00
|
|
|
RUN apt update && apt install -y git build-essential cmake wget libgomp1
|
2024-02-02 07:56:31 +00:00
|
|
|
|
|
|
|
# Install Vulkan SDK
|
|
|
|
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
|
|
|
|
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
|
|
|
|
apt update -y && \
|
|
|
|
apt-get install -y vulkan-sdk
|
|
|
|
|
|
|
|
# Build it
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
2024-06-26 16:32:07 +00:00
|
|
|
RUN cmake -B build -DGGML_VULKAN=1 && \
|
2024-06-12 23:41:52 +00:00
|
|
|
cmake --build build --config Release --target llama-cli
|
2024-02-02 07:56:31 +00:00
|
|
|
|
|
|
|
# Clean up
|
|
|
|
WORKDIR /
|
2024-06-12 23:41:52 +00:00
|
|
|
RUN cp /app/build/bin/llama-cli /llama-cli && \
|
2024-02-02 07:56:31 +00:00
|
|
|
rm -rf /app
|
|
|
|
|
|
|
|
ENV LC_ALL=C.utf8
|
|
|
|
|
2024-06-12 23:41:52 +00:00
|
|
|
ENTRYPOINT [ "/llama-cli" ]
|