feat(ollama) add ollama (#16907)

**Description**
Get up and running with large language models locally.
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [X] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [X] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Xstar97TheNoob 2024-01-09 13:13:05 -05:00 committed by GitHub
parent 2f3e5c2653
commit 55af679555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 271 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# docs folder
/docs
# icon
icon.png

View File

@ -0,0 +1 @@
# Changelog

View File

@ -0,0 +1,38 @@
kubeVersion: ">=1.24.0-0"
apiVersion: v2
name: ollama
version: 0.0.1
appVersion: 0.1.18
description: Get up and running with large language models locally.
home: https://truecharts.org/charts/dev/ollama
icon: https://truecharts.org/img/hotlink-ok/chart-icons/ollama.png
deprecated: false
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/ollama
- https://github.com/jmorganca/ollama
- https://hub.docker.com/r/ollama/ollama
- https://github.com/ollama-webui/ollama-webui
maintainers:
- name: TrueCharts
email: info@truecharts.org
url: https://truecharts.org
keywords:
- ollama
- language-models
dependencies:
- name: common
version: 17.2.21
repository: https://library-charts.truecharts.org
condition: ""
alias: ""
tags: []
import-values: []
annotations:
max_scale_version: 23.10.2
min_scale_version: 23.10.0
truecharts.org/SCALE-support: "true"
truecharts.org/category: ai
truecharts.org/max_helm_version: "3.13"
truecharts.org/min_helm_version: "3.12"
truecharts.org/train: incubator
type: application

View File

@ -0,0 +1 @@
# README

BIN
charts/dev/ollama/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,100 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
# Include{containerBasic}
# Include{containerAdvanced}
# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
# Include{serviceMain}
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: "Main Service Port Configuration"
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: "Port"
description: "This port exposes the container port on the service"
schema:
type: int
default: 10686
required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: config
label: "App Config Storage"
description: "Stores the Application Configuration."
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: data
label: "App Data Storage"
description: "Stores the Application Data."
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: "Main Ingress"
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressAdvanced}
# Include{ingressList}
# Include{securityContextRoot}
- variable: runAsUser
label: "runAsUser"
description: "The UserID of the user running the application"
schema:
type: int
default: 0
- variable: runAsGroup
label: "runAsGroup"
description: "The groupID of the user running the application"
schema:
type: int
default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
type: int
default: 568
# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}

View File

@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}

View File

@ -0,0 +1 @@
{{ include "tc.v1.common.loader.all" . }}

View File

@ -0,0 +1,99 @@
image:
repository: ollama/ollama
pullPolicy: IfNotPresent
tag: 0.1.18@sha256:5327f8c3f43e30804dbdbc039e8fcf253af8291e149f186dc5c7733f68e29217
uiImage:
repository: ghcr.io/ollama-webui/ollama-webui
pullPolicy: IfNotPresent
tag: main@sha256:50dfa1104ae2f5c450bdc23920bc503a3cecd50f02efa328df98c317f8552e6c
service:
main:
targetSelector: ui
ports:
main:
protocol: http
targetPort: 8080
port: 10686
targetSelector: ui
api:
enabled: true
type: ClusterIP
targetSelector: main
ports:
api:
enabled: true
protocol: http
port: 11434
targetSelector: main
workload:
main:
podSpec:
containers:
main:
imageSelector: image
securityContext:
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
probes:
liveness:
enabled: true
type: http
path: /api/version
port: "{{ .Values.service.api.ports.api.port }}"
readiness:
enabled: true
type: http
path: /api/version
port: "{{ .Values.service.api.ports.api.port }}"
startup:
enabled: true
type: tcp
port: "{{ .Values.service.api.ports.api.port }}"
ui:
enabled: true
type: Deployment
podSpec:
containers:
ui:
primary: true
enabled: true
imageSelector: uiImage
probes:
liveness:
enabled: true
type: http
path: /
port: "{{ .Values.service.main.ports.main.targetPort }}"
readiness:
enabled: true
type: http
path: /
port: "{{ .Values.service.main.ports.main.targetPort }}"
startup:
enabled: true
type: tcp
port: "{{ .Values.service.main.ports.main.targetPort }}"
env:
OLLAMA_API_BASE_URL: '{{ printf "http://%v:%v/api" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.api.ports.api.port }}'
persistence:
config:
enabled: true
targetSelector:
main:
main:
mountPath: "/root/.ollama"
data:
enabled: true
targetSelector:
ui:
ui:
mountPath: "/app/backend/data"
portal:
open:
enabled: true