--- apiVersion: apps/v1 kind: Deployment metadata: name: llama-swap namespace: llama spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: llama-swap template: metadata: labels: app: llama-swap spec: initContainers: - name: download-whisper image: ghcr.io/mostlygeek/llama-swap:unified-vulkan-2026-05-21 command: - sh - -c - | mkdir -p /root/.cache/whisper if [ ! -f /root/.cache/whisper/ggml-small.bin ]; then echo "Downloading whisper-small model..." curl -L -o /root/.cache/whisper/ggml-small.bin \ https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin else echo "whisper-small model already present, skipping download" fi if [ ! -f /root/.cache/ffmpeg/ffmpeg ]; then echo "Downloading static ffmpeg..." mkdir -p /root/.cache/ffmpeg curl -L -o /root/.cache/ffmpeg/ffmpeg.tar.gz \ https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.gz tar -xzf /root/.cache/ffmpeg/ffmpeg.tar.gz -C /root/.cache/ffmpeg --wildcards '*/ffmpeg' --strip-components=1 rm /root/.cache/ffmpeg/ffmpeg.tar.gz chmod +x /root/.cache/ffmpeg/ffmpeg else echo "ffmpeg already present, skipping download" fi volumeMounts: - name: models mountPath: /root/.cache containers: - name: llama-swap image: ghcr.io/mostlygeek/llama-swap:unified-vulkan-2026-05-21 imagePullPolicy: IfNotPresent command: - llama-swap args: - --config=/config/config.yaml - --watch-config ports: - containerPort: 8080 name: http protocol: TCP volumeMounts: - name: models mountPath: /root/.cache - name: models mountPath: /usr/local/bin/ffmpeg subPath: ffmpeg/ffmpeg - mountPath: /dev/kfd name: kfd - mountPath: /dev/dri name: dri - mountPath: /config name: config securityContext: privileged: true volumes: - name: models persistentVolumeClaim: claimName: llama-models-lvmssd - name: kfd hostPath: path: /dev/kfd type: CharDevice - name: dri hostPath: path: /dev/dri type: Directory - name: config configMap: name: llama-swap --- apiVersion: v1 kind: Service metadata: name: llama namespace: llama spec: type: ClusterIP ports: - name: http port: 11434 targetPort: 8080 protocol: TCP selector: app: llama-swap