From 6b82a26c25f1592a2d1c9bea4f941864362fe001 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sun, 10 May 2026 10:07:25 -0400 Subject: [PATCH] fix: add ldflags for version, remove privileged, enable flash attention --- ai/compose.yml | 3 +-- ai/ollama/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ai/compose.yml b/ai/compose.yml index dceb490..2e565ae 100644 --- a/ai/compose.yml +++ b/ai/compose.yml @@ -63,7 +63,6 @@ services: dockerfile: Dockerfile image: ollama/ollama:rocm-gfx906 container_name: ollama - privileged: true tty: true restart: always ports: @@ -81,7 +80,7 @@ services: - HSA_ENABLE_SDMA=0 - OLLAMA_HOST=0.0.0.0 - OLLAMA_DEBUG=1 - - OLLAMA_FLASH_ATTENTION=0 + - OLLAMA_FLASH_ATTENTION=1 - OLLAMA_NUM_PARALLEL=2 devices: # Map the render nodes and KFD for ROCm to work inside the container diff --git a/ai/ollama/Dockerfile b/ai/ollama/Dockerfile index f41ab5d..438e607 100644 --- a/ai/ollama/Dockerfile +++ b/ai/ollama/Dockerfile @@ -74,7 +74,7 @@ RUN mkdir -p build-hip && \ # Step 3: Build Go binary (GCC for CGo linking) ENV CGO_ENABLED=1 -RUN go build -trimpath -o /build/dist/ollama . +RUN go build -trimpath -ldflags="-X=github.com/ollama/ollama/version.Version=${OLLAMA_VERSION}" -o /build/dist/ollama . # ---------- Runtime image ---------- FROM ubuntu:24.04