Files
ComfyUI-ARM64-Docker/comfyui-rocm-dockerfile
T
derek 7bd402b08e
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
use the builder for all the dependancies
2026-09-09 19:26:06 -07:00

44 lines
1.2 KiB
Plaintext

# Stage 1: Build Ollama with Vulkan support
FROM ubuntu:26.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y && apt install -y \
build-essential \
git \
curl \
wget \
cmake \
golang-go \
ca-certificates
# Directly install glslc via Debian arm64 package
RUN wget http://ftp.debian.org/debian/pool/main/s/shaderc/glslc_2023.2-1_arm64.deb \
&& apt-get update && apt-get install -y ./glslc_2023.2-1_arm64.deb \
&& rm glslc_2023.2-1_arm64.deb
# install the rest of the requirements
RUN apt update && apt upgrade -y && apt install -y \
libvulkan-dev \
vulkan-tools \
glslang-tools \
ninja-build \
spirv-headers \
spirv-tools
WORKDIR /app
RUN git clone --recursive https://github.com/ollama/ollama.git .
# Configure and safely build with constrained parallelism to protect 96GB RAM
RUN cmake -B build . -DOLLAMA_LLAMA_BACKENDS="vulkan" -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build --parallel 16
# Build the main Go application binary
RUN go build -o ollama .
# Start the server
EXPOSE 11434
ENV OLLAMA_HOST=0.0.0.0:11434
ENV OLLAMA_MODELS=/root/.ollama/models
ENTRYPOINT ["ollama", "serve"]