llama-server, llama-embed, wiki-embed (gpu.intel.com/i915) and the wiki behind them are bound to the Intel iGPU. On a site without one (Hetzner, restore rehearsal runs 27/28) their pods stayed Pending, and the GPU plugin and exporter DaemonSets sat on every node with nothing to serve. The node patches k8s-1..3 label their machines hardware.renner.uno/intel-gpu=true. The GPU plugin, the exporter, the three llama Deployments and the wiki now select on it. Elsewhere the DaemonSets have no pods and the Deployments stay unscheduled. Production rollout order: the label must be on the nodes (talosctl patch, no reboot) before these manifests reconcile, or the GPU plugin and the llama/wiki pods are removed or left Pending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
121 lines
3.2 KiB
YAML
121 lines
3.2 KiB
YAML
---
|
|
# Embedding endpoint for the ~/Notes wiki ranker (bin/wiki_rank.py). Own
|
|
# Deployment so wiki traffic never queues behind Paperless on llama-embed.
|
|
# Same model and PVC as llama-embed, so no second download.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: wiki-embed
|
|
namespace: ai
|
|
labels:
|
|
app.kubernetes.io/name: wiki-embed
|
|
spec:
|
|
replicas: 1
|
|
# Above the 600s startupProbe budget; see embed.yaml.
|
|
progressDeadlineSeconds: 900
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: wiki-embed
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wiki-embed
|
|
spec:
|
|
# Runs only where the node patch declares the Intel iGPU.
|
|
nodeSelector:
|
|
hardware.renner.uno/intel-gpu: "true"
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: wiki-embed
|
|
image: ghcr.io/ggml-org/llama.cpp:server-vulkan-b10731@sha256:0262343f64f030e8efff15ec05ee8180b69b7f6745de2caa3af5148e0dcb8aba
|
|
args:
|
|
- --hf-repo
|
|
- gpustack/bge-m3-GGUF:Q8_0
|
|
- --embeddings
|
|
- --alias
|
|
- bge-m3
|
|
# bge-m3 is trained for CLS pooling; the GGUF default is not.
|
|
- --pooling
|
|
- cls
|
|
- --n-gpu-layers
|
|
- "99"
|
|
- --threads
|
|
- "2"
|
|
# wiki_rank.py caps each note at 1500 chars and sends 2 per request.
|
|
- --batch-size
|
|
- "1536"
|
|
- --ubatch-size
|
|
- "1536"
|
|
- --ctx-size
|
|
- "4096"
|
|
- --no-webui
|
|
env:
|
|
- name: LLAMA_CACHE
|
|
value: /models
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
# Same sizing as llama-embed: 1.6 GiB measured peak, headroom for slots.
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 2Gi
|
|
gpu.intel.com/i915: "1"
|
|
limits:
|
|
cpu: "2"
|
|
memory: 8Gi
|
|
gpu.intel.com/i915: "1"
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
periodSeconds: 10
|
|
failureThreshold: 60
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
periodSeconds: 30
|
|
timeoutSeconds: 10
|
|
failureThreshold: 6
|
|
volumeMounts:
|
|
- name: models
|
|
mountPath: /models
|
|
volumes:
|
|
- name: models
|
|
persistentVolumeClaim:
|
|
claimName: llama-server-models
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: wiki-embed
|
|
namespace: ai
|
|
labels:
|
|
app.kubernetes.io/name: wiki-embed
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: wiki-embed
|
|
ports:
|
|
- name: http
|
|
port: 8080
|
|
targetPort: http
|