backup stack: ollama-sycl [2026-09-28]

This commit is contained in:
moonside committed 2026-09-28 02:12:40 +00:00
1 parent 24dd0e4d40
commit dfe79e843b
1 file changed
+139
+139
View File
@@ -0,0 +1,139 @@
# https://github.com/eleiton/ollama-intel-arc/blob/main/ollama-sycl/Dockerfile
# WSL2 compose for the SYCL-from-source Ollama image
# Target: Intel Arc Pro B65 (32GB), Docker Desktop w/ WSL2 integration
#
# The image is built separately (Portainer web editor, from
# eleiton/ollama-intel-arc ollama-sycl/Dockerfile) and tagged ollama-sycl:local.
# No build: block here - this file only runs it.
#
# Rebuild later with:
# docker build -t ollama-sycl:local ollama-sycl/ (from a repo clone)
#
# Differences from the upstream ollama-sycl compose:
# 1. /dev/dri -> /dev/dxg (WSL2 has no DRI node)
# 2. + /usr/lib/wsl mount (d3d12/dxcore shims)
# 3. Host port 11435 (avoids Windows-host Ollama on 11434)
# 4. Named volumes (see note below)
# 5. + Open WebUI, pointed at both this Ollama and llm-scaler-vllm
# 6. + ollama-init sidecar (warms the default model, pulls only if absent)
services:
ollama-sycl:
image: ollama-sycl:3.4.9
container_name: ollama-sycl
restart: unless-stopped
devices:
- /dev/dxg:/dev/dxg
volumes:
- ollama-data:/root/.ollama
- sycl-cache:/root/.cache
# Stays a bind: read-only host path, not stateful data.
- /usr/lib/wsl:/usr/lib/wsl:ro
ports:
- 11435:11434
environment:
- no_proxy=localhost,127.0.0.1,ollama-sycl
- NO_PROXY=localhost,127.0.0.1,ollama-sycl
- OLLAMA_HOST=0.0.0.0
# The IMAGE already sets ONEAPI_DEVICE_SELECTOR=level_zero:0. Commenting
# a line out here does NOT unset it. If sycl-ls finds no GPU, uncomment
# the wildcard below to let it enumerate everything instead.
# - ONEAPI_DEVICE_SELECTOR=*
- ZES_ENABLE_SYSMAN=1
- SYCL_CACHE_PERSISTENT=1
- SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
- UR_L0_USE_IMMEDIATE_COMMANDLISTS=1
- OLLAMA_FLASH_ATTENTION=1
- OLLAMA_CONTEXT_LENGTH=32768 # 65536 made prefill unbearable before
# - OLLAMA_KEEP_ALIVE=30m # image default is 24h
- OLLAMA_KEEP_ALIVE=-1 # infinite
- OLLAMA_MAX_LOADED_MODELS=2
- OLLAMA_NUM_PARALLEL=1 # raise only after tool-calling is stable
# No command: override - the image's ENTRYPOINT already runs `ollama serve`.
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:11434/ >/dev/null 2>&1"]
interval: 15s
timeout: 10s
retries: 10
start_period: 120s
# Runs once per `docker compose up`, after ollama-sycl reports healthy.
ollama-init:
image: curlimages/curl:latest
container_name: ollama-init
depends_on:
ollama-sycl:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command:
- |
for MODEL in qwen3.6:27b minicpm-v; do
curl -sf http://ollama-sycl:11434/api/tags | grep -q "$$MODEL" \
|| curl -s http://ollama-sycl:11434/api/pull -d "{\"name\":\"$$MODEL\"}"
curl -s http://ollama-sycl:11434/api/generate \
-d "{\"model\":\"$$MODEL\",\"prompt\":\"\",\"keep_alive\":-1}"
done
restart: "no"
open-webui:
# Pinned to the digest currently running and known good. :latest on a stack
# with a SQLite database means an unattended pull can hand you a schema
# change you did not choose. Update deliberately: pull the new tag, back up
# the volume, then bump this line.
image: ghcr.io/open-webui/open-webui@sha256:c792953395b43d4f49085fa4026850c5e923578345ebeaf56eabd980bcfc273a
container_name: open-webui
restart: unless-stopped
volumes:
- open-webui-data:/app/backend/data
depends_on:
- ollama-sycl
ports:
- 4040:8080
environment:
- WEBUI_AUTH=True
# Container-to-container, so the INTERNAL port 11434, not 11435.
- ENABLE_OLLAMA_API=True
- OLLAMA_BASE_URL=http://ollama-sycl:11434
# llm-scaler-vllm via the host gateway. Adjust the port to match your
# vllm serve. Flip this to False while that stack is down - otherwise the
# logs fill with "Cannot connect to host host.docker.internal:8000" and
# Open WebUI stalls on load waiting for an unreachable endpoint.
- ENABLE_OPENAI_API=True
- OPENAI_API_BASE_URL=http://host.docker.internal:8000/v1
- OPENAI_API_KEY=dummy
- ENABLE_SIGNUP=False
# ROTATE THIS - the previous value was pasted into a chat window.
# Generate with: openssl rand -hex 32
- WEBUI_SECRET_KEY=16ef380a575dfcb0d0c3f2bba4c10352b3384bc6cf7badedb85acc2d41772b69
# Pre-selects this model in the chat UI for new sessions. Matches the
# model ollama-init pre-loads into VRAM above.
- DEFAULT_MODELS=qwen3.6:27b
#
# Web search. DuckDuckGo is reached through the `ddgs` metasearch engine,
# which has its own backend selector. Set DDGS_BACKEND=auto to rotate
# providers if you start hitting rate limits.
#
# CAUTION: these are PersistentConfig values. They seed the database on
# FIRST startup only and are ignored afterwards - the admin UI becomes the
# source of truth. They will take on a fresh volume. To make this file
# always win instead, set ENABLE_PERSISTENT_CONFIG=False (admin UI toggles
# then stop persisting at all).
#
# Neither of these is settable here - do them in the UI after setup:
# Settings -> Interface -> Web Search in Chat -> Always
# Workspace -> Models -> gemma4:26b -> Capabilities -> Default Features
# -> check Web Search (native mode will not inject search_web
# without it, even with the chat toggle on)
- ENABLE_WEB_SEARCH=True
- WEB_SEARCH_ENGINE=ddgs
- DDGS_BACKEND=duckduckgo
- WEB_SEARCH_RESULT_COUNT=3
- WEB_SEARCH_CONCURRENT_REQUESTS=2
extra_hosts:
- host.docker.internal:host-gateway
volumes:
ollama-data:
sycl-cache:
open-webui-data: