Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
b42b2e78
Commit
b42b2e78
authored
Dec 28, 2023
by
braveokafor
Browse files
Added nodeSelectors for allocating GPU nodePools in the cloud and configured volumes for WebUI
parent
02ce0c47
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
13 deletions
+64
-13
kubernetes/helm/templates/ollama-service.yaml
kubernetes/helm/templates/ollama-service.yaml
+1
-0
kubernetes/helm/templates/ollama-statefulset.yaml
kubernetes/helm/templates/ollama-statefulset.yaml
+23
-6
kubernetes/helm/templates/webui-deployment.yaml
kubernetes/helm/templates/webui-deployment.yaml
+16
-6
kubernetes/helm/templates/webui-pvc.yaml
kubernetes/helm/templates/webui-pvc.yaml
+12
-0
kubernetes/helm/templates/webui-service.yaml
kubernetes/helm/templates/webui-service.yaml
+1
-1
kubernetes/helm/values.yaml
kubernetes/helm/values.yaml
+11
-0
No files found.
kubernetes/helm/templates/ollama-service.yaml
View file @
b42b2e78
...
...
@@ -4,6 +4,7 @@ metadata:
name
:
ollama-service
namespace
:
{{
.Values.namespace
}}
spec
:
type
:
{{
.Values.ollama.service.type
}}
selector
:
app
:
ollama
ports
:
...
...
kubernetes/helm/templates/ollama-statefulset.yaml
View file @
b42b2e78
...
...
@@ -19,15 +19,32 @@ spec:
image
:
{{
.Values.ollama.image
}}
ports
:
-
containerPort
:
{{
.Values.ollama.servicePort
}}
resources
:
limits
:
cpu
:
{{
.Values.ollama.resources.limits.cpu
}}
memory
:
{{
.Values.ollama.resources.limits.memory
}}
nvidia.com/gpu
:
{{
.Values.ollama.resources.limits.gpu
}}
env
:
{{
- if .Values.ollama.gpu.enabled
}}
-
name
:
PATH
value
:
/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-
name
:
LD_LIBRARY_PATH
value
:
/usr/local/nvidia/lib:/usr/local/nvidia/lib64
-
name
:
NVIDIA_DRIVER_CAPABILITIES
value
:
compute,utility
{{
- end
}}
{{
- if .Values.ollama.resources
}}
resources
:
{{
- toYaml .Values.ollama.resources | nindent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
ollama-volume
mountPath
:
/root/.ollama
tty
:
true
{{
- with .Values.ollama.nodeSelector
}}
nodeSelector
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
tolerations
:
{{
- if .Values.ollama.gpu.enabled
}}
-
key
:
nvidia.com/gpu
operator
:
Exists
effect
:
NoSchedule
{{
- end
}}
volumeClaimTemplates
:
-
metadata
:
name
:
ollama-volume
...
...
@@ -35,4 +52,4 @@ spec:
accessModes
:
[
"
ReadWriteOnce"
]
resources
:
requests
:
storage
:
1Gi
\ No newline at end of file
storage
:
{{
.Values.ollama.volumeSize
}}
\ No newline at end of file
kubernetes/helm/templates/webui-deployment.yaml
View file @
b42b2e78
...
...
@@ -15,14 +15,24 @@ spec:
spec
:
containers
:
-
name
:
ollama-webui
image
:
ghcr.io/ollama-webui/ollama-webui:main
image
:
{{
.Values.webui.image
}}
ports
:
-
containerPort
:
8080
resources
:
limits
:
cpu
:
"
500m"
memory
:
"
500Mi"
{{
- if .Values.webui.resources
}}
resources
:
{{
- toYaml .Values.webui.resources | nindent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
webui-volume
mountPath
:
/app/backend/data
env
:
-
name
:
OLLAMA_API_BASE_URL
value
:
"
http://ollama-service.{{
.Values.namespace
}}.svc.cluster.local:{{
.Values.ollama.servicePort
}}/api"
tty
:
true
\ No newline at end of file
tty
:
true
{{
- with .Values.webui.nodeSelector
}}
nodeSelector
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
volumes
:
-
name
:
webui-volume
persistentVolumeClaim
:
claimName
:
ollama-webui-pvc
\ No newline at end of file
kubernetes/helm/templates/webui-pvc.yaml
0 → 100644
View file @
b42b2e78
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
labels
:
app
:
ollama-webui
name
:
ollama-webui-pvc
namespace
:
{{
.Values.namespace
}}
spec
:
accessModes
:
[
"
ReadWriteOnce"
]
resources
:
requests
:
storage
:
{{
.Values.webui.volumeSize
}}
\ No newline at end of file
kubernetes/helm/templates/webui-service.yaml
View file @
b42b2e78
...
...
@@ -4,7 +4,7 @@ metadata:
name
:
ollama-webui-service
namespace
:
{{
.Values.namespace
}}
spec
:
type
:
NodePort
# Use LoadBalancer if you're on a cloud that supports it
type
:
{{
.Values.webui.service.type
}}
# Default:
NodePort # Use LoadBalancer if you're on a cloud that supports it
selector
:
app
:
ollama-webui
ports
:
...
...
kubernetes/helm/values.yaml
View file @
b42b2e78
...
...
@@ -10,6 +10,12 @@ ollama:
memory
:
"
2Gi"
nvidia.com/gpu
:
"
0"
volumeSize
:
1Gi
nodeSelector
:
{}
tolerations
:
[]
service
:
type
:
ClusterIP
gpu
:
enabled
:
false
webui
:
replicaCount
:
1
...
...
@@ -25,3 +31,8 @@ webui:
# Use appropriate annotations for your Ingress controller, e.g., for NGINX:
# nginx.ingress.kubernetes.io/rewrite-target: /
host
:
ollama.minikube.local
volumeSize
:
1Gi
nodeSelector
:
{}
tolerations
:
[]
service
:
type
:
NodePort
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment