Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/unified-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ on:
description: "llama-swap version (e.g. v198, latest, main)"
required: false
default: "main"
build_cuda:
description: "Build CUDA image"
type: boolean
required: false
default: true
build_vulkan:
description: "Build Vulkan image"
type: boolean
required: false
default: true

permissions:
contents: read
Expand All @@ -33,7 +43,12 @@ jobs:
strategy:
fail-fast: false
matrix:
backend: [cuda, vulkan]
backend:
- cuda
- vulkan
exclude:
- backend: ${{ inputs.build_cuda == false && 'cuda' || 'none' }}
- backend: ${{ inputs.build_vulkan == false && 'vulkan' || 'none' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
15 changes: 5 additions & 10 deletions docker/unified/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ WORKDIR /build

# ──

FROM ubuntu:22.04 AS builder-base-vulkan
FROM ubuntu:26.04 AS builder-base-vulkan

ENV DEBIAN_FRONTEND=noninteractive
ENV CCACHE_DIR=/ccache
Expand All @@ -39,12 +39,7 @@ ENV PATH="/usr/lib/ccache:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git python3 python3-pip libssl-dev \
curl ca-certificates ccache make wget software-properties-common \
&& rm -rf /var/lib/apt/lists/*

# Install LunarG Vulkan SDK (Ubuntu 22.04 repo headers are too old)
RUN wget -qO /etc/apt/trusted.gpg.d/lunarg.asc https://packages.lunarg.com/lunarg-signing-key-pub.asc \
&& echo "deb https://packages.lunarg.com/vulkan jammy main" > /etc/apt/sources.list.d/lunarg-vulkan.list \
&& apt-get update && apt-get install -y --no-install-recommends vulkan-sdk \
libvulkan-dev glslang-tools spirv-tools vulkan-validationlayers glslc \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /build
Expand Down Expand Up @@ -108,7 +103,7 @@ COPY --from=builder-base-cuda /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/

# ──

FROM ubuntu:22.04 AS runtime-vulkan
FROM ubuntu:26.04 AS runtime-vulkan

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/usr/local/bin:${PATH}"
Expand All @@ -127,10 +122,10 @@ ARG LLAMA_COMMIT_HASH=unknown
ARG WHISPER_COMMIT_HASH=unknown
ARG SD_COMMIT_HASH=unknown

RUN pip3 install --no-cache-dir numpy sentencepiece
RUN pip3 install --no-cache-dir --break-system-packages numpy sentencepiece

# Create llama-swap user and config directory
RUN useradd --system --no-create-home --shell /sbin/nologin llama-swap && \
RUN useradd --system --create-home --shell /sbin/nologin llama-swap && \
mkdir -p /etc/llama-swap/config && \
chown -R llama-swap:llama-swap /etc/llama-swap

Expand Down
1 change: 1 addition & 0 deletions docker/unified/install-sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ elif [ "$BACKEND" = "vulkan" ]; then
CMAKE_FLAGS+=(
-DGGML_CUDA=OFF
-DGGML_VULKAN=ON
-DSD_VULKAN=ON
)
fi

Expand Down
Loading