use the builder for all the dependancies
Docker Build and Release Upload / build-vulkan (push) Successful in 2m33s
Docker Build and Release Upload / build-uvicorn (push) Canceled after 0s
Docker Build and Release Upload / build-cuda (push) Canceled after 4s

This commit is contained in:
derek committed 2026-09-09 19:26:06 -07:00
1 parent e8b2e4cb32
commit 7bd402b08e
1 file changed
+1 -16
+1 -16
View File
@@ -36,22 +36,7 @@ RUN cmake --build build --parallel 16
# Build the main Go application binary
RUN go build -o ollama .
# Stage 2: Minimal Runtime Image
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libvulkan1 \
mesa-vulkan-drivers \
vulkan-tools \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the compiled Go binary and generated native backend libraries
COPY --from=builder /app/ollama /usr/local/bin/ollama
COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama
# Start the server
EXPOSE 11434
ENV OLLAMA_HOST=0.0.0.0:11434
ENV OLLAMA_MODELS=/root/.ollama/models