From b8c0a29009e4be52e80ca5f942edd9cbc7e1d4c7 Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Sun, 9 Nov 2025 14:46:30 +0100 Subject: [PATCH] lmstudio und webui im pod --- .gitmodules | 3 ++ lmstudio-docker | 1 + lmstudio-open-webui.yaml | 66 ++++++++++++++++++++++++++++++++++++++++ ollama-open-webui.yaml | 3 ++ 4 files changed, 73 insertions(+) create mode 100644 .gitmodules create mode 160000 lmstudio-docker create mode 100644 lmstudio-open-webui.yaml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c570b2d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lmstudio-docker"] + path = lmstudio-docker + url = https://github.com/n0mer1/lmstudio-docker.git diff --git a/lmstudio-docker b/lmstudio-docker new file mode 160000 index 0000000..efccf9f --- /dev/null +++ b/lmstudio-docker @@ -0,0 +1 @@ +Subproject commit efccf9f6ba3e2da6c18a98570627b9bea0694ef7 diff --git a/lmstudio-open-webui.yaml b/lmstudio-open-webui.yaml new file mode 100644 index 0000000..77b3314 --- /dev/null +++ b/lmstudio-open-webui.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: Pod +metadata: + hostname: lmstudio-webui + name: lmstudio-open-webui + labels: + app: lmstudio-open-webui + annotations: + run.oci.keep_original_groups: "1" + cdi.k8s.io/DeviceName.0: "podman.io/device=/dev/kfd" + cdi.k8s.io/DeviceName.1: "podman.io/device=/dev/dri" +spec: + hostNetwork: true + containers: + # lmstudio container + - name: lmstudio + image: localhost/lm-studio-debian + hostname: lmstudio + ports: + - containerPort: 1234 + - containerPort: 5900 + volumeMounts: + - name: lmstudio-data + mountPath: /root/.lmstudio + - name: dev-dri + mountPath: /dev/dri + - name: dev-kfd + mountPath: /dev/kfd + securityContext: + capabilities: + add: + - SYS_ADMIN + + # Open WebUI container + - name: open-webui + image: ghcr.io/open-webui/open-webui:main + hostname: webui + ports: + - containerPort: 8080 + volumeMounts: + - name: open-webui-pvc + mountPath: /app/backend/data + securityContext: + capabilities: + add: + - SYS_ADMIN + + volumes: + # Persistent volumes + - name: open-webui-pvc + persistentVolumeClaim: + claimName: open-webui + + # HostPath devices for GPU access + - name: lmstudio-data + hostPath: + path: /home/do/.lmstudio + type: Directory + - name: dev-dri + hostPath: + path: /dev/dri + type: Directory + - name: dev-kfd + hostPath: + path: /dev/kfd + type: CharDevice diff --git a/ollama-open-webui.yaml b/ollama-open-webui.yaml index d5a00a8..185a24f 100644 --- a/ollama-open-webui.yaml +++ b/ollama-open-webui.yaml @@ -1,6 +1,7 @@ apiVersion: v1 kind: Pod metadata: + hostname: ollama-webui name: ollama-open-webui labels: app: ollama-open-webui @@ -14,6 +15,7 @@ spec: # Ollama container - name: ollama image: docker.io/ollama/ollama:0.12.3-rocm + hostname: ollama args: - serve env: @@ -36,6 +38,7 @@ spec: # Open WebUI container - name: open-webui image: ghcr.io/open-webui/open-webui:main + hostname: webui ports: - containerPort: 8080 volumeMounts: