diff --git a/comfyui-rocm-dockerfile b/comfyui-rocm-dockerfile index a5e540b..51ebff0 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 @@ -16,8 +16,8 @@ RUN apt-get update && apt-get install -y \ WORKDIR /app RUN git clone --recursive https://github.com/ollama/ollama.git . -# Configure and build using CMake for Vulkan backend support -RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D OLLAMA_LLAMA_BACKENDS="vulkan" +# Configure CMake explicitly for Vulkan backend compilation +RUN cmake -B build . -DOLLAMA_LLAMA_BACKENDS="vulkan" RUN cmake --build build --parallel $(nproc) # Build the final Go binary @@ -35,10 +35,8 @@ RUN apt-get update && apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* -# Copy the compiled binary from the builder stage +# Copy the compiled binary and backend libraries from builder stage COPY --from=builder /app/ollama /usr/local/bin/ollama - -# Copy built backend libraries if generated under build output COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama EXPOSE 11434