Skip to content

Commit

Permalink
Merge pull request #73 from otwld/feat/dynamic-mount-path-ollama-data
Browse files Browse the repository at this point in the history
Feat: dynamic mount path ollama-data
  • Loading branch information
jdetroyes authored Jul 16, 2024
2 parents 1cbf79d + fcf6a45 commit 5b40b6e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ annotations:
artifacthub.io/changes: |
- kind: added
description: Add shared host namespace hostIPC, hostPID and hostNetwork
- kind: added
description: add ollama.mountPath to override default ollama mountPath
kubeVersion: "^1.16.0-0"
home: https://ollama.ai/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ ingress:
| ollama.gpu.type | string | `"nvidia"` | GPU type: 'nvidia' or 'amd' If 'ollama.gpu.enabled', default value is nvidia If set to 'amd', this will add 'rocm' suffix to image tag if 'image.tag' is not override This is due cause AMD and CPU/CUDA are different images |
| ollama.insecure | bool | `false` | Add insecure flag for pulling at container startup |
| ollama.models | list | `[]` | List of models to pull at container startup The more you add, the longer the container will take to start if models are not present models: - llama2 - mistral |
| ollama.mountPath | string | `""` | Override ollama-data volume mount path, default: "/root/.ollama" |
| persistentVolume.accessModes | list | `["ReadWriteOnce"]` | Ollama server data Persistent Volume access modes Must match those of existing PV or dynamic provisioner Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ |
| persistentVolume.annotations | object | `{}` | Ollama server data Persistent Volume annotations |
| persistentVolume.enabled | bool | `false` | Enable persistence using PVC |
Expand Down
2 changes: 1 addition & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
{{- end}}
volumeMounts:
- name: ollama-data
mountPath: /root/.ollama
mountPath: {{ .Values.ollama.mountPath | default "/root/.ollama" }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
5 changes: 4 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ ollama:
# -- Add insecure flag for pulling at container startup
insecure: false

# -- Override ollama-data volume mount path, default: "/root/.ollama"
mountPath: ""

# Service account
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccount:
Expand Down Expand Up @@ -318,4 +321,4 @@ hostIPC: false
hostPID: false

# -- Use the host's network namespace.
hostNetwork: false
hostNetwork: false

0 comments on commit 5b40b6e

Please sign in to comment.