From 60bd373bfdefe5b1f2e242b28fd464698250c35b Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Wed, 9 Sep 2026 15:42:41 -0700 Subject: [PATCH] asdf --- comfyui-rocm-dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/comfyui-rocm-dockerfile b/comfyui-rocm-dockerfile index 2111a79..7d5456a 100644 --- a/comfyui-rocm-dockerfile +++ b/comfyui-rocm-dockerfile @@ -1,4 +1,4 @@ -# Stage 1: Build Ollama with Vulkan support for ARM64/AMD64 +# Stage 1: Build Ollama with Vulkan support FROM ubuntu:24.04 AS builder ENV DEBIAN_FRONTEND=noninteractive @@ -12,18 +12,18 @@ RUN apt-get update && apt-get install -y \ libvulkan-dev \ vulkan-tools \ glslang-tools \ + ninja-build \ && rm -rf /var/lib/apt/lists/* WORKDIR /app RUN git clone --recursive https://github.com/ollama/ollama.git . -# Configure CMake with explicit Vulkan backend parameter -RUN cmake -B build . -DOLLAMA_LLAMA_BACKENDS="vulkan" +# Use Ollama's official preset configuration for Vulkan compilation +RUN cmake -S llama/server --preset vulkan +RUN cmake --build build/llama-server-vulkan --parallel $(nproc) +RUN cmake --install build/llama-server-vulkan --component llama-server --prefix /app/dist -# Compile target with parallel jobs -RUN cmake --build build --parallel $(nproc) - -# Build the main Go executable +# Build the main Go application binary RUN go build -o ollama . # Stage 2: Minimal Runtime Image @@ -38,9 +38,9 @@ RUN apt-get update && apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* -# Copy binary and runtime libraries from builder +# Copy the compiled Go binary and the Vulkan backend runtime payload COPY --from=builder /app/ollama /usr/local/bin/ollama -COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama +COPY --from=builder /app/dist /usr/local EXPOSE 11434 ENV OLLAMA_HOST=0.0.0.0:11434