79 lines
1.7 KiB
YAML
79 lines
1.7 KiB
YAML
---
|
|
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:
|
|
containers:
|
|
- name: llama-swap
|
|
image: ghcr.io/mostlygeek/llama-swap:v198-vulkan-b8400
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- /app/llama-swap
|
|
args:
|
|
- --config=/config/config.yaml
|
|
- --watch-config
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
env:
|
|
- name: OPENROUTER_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: llama-openrouter
|
|
key: OPENROUTER_API_KEY
|
|
volumeMounts:
|
|
- name: models
|
|
mountPath: /root/.cache
|
|
- 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
|