feat(local-ai) add local-ai (#10323)

This commit is contained in:
Xstar97TheNoob
2023-07-24 15:29:47 +02:00
committed by GitHub
parent 96342ca379
commit 5dc864a957
15 changed files with 354 additions and 0 deletions
+30
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
+1
View File
@@ -0,0 +1 @@
# Changelog
+28
View File
@@ -0,0 +1,28 @@
apiVersion: v2
appVersion: "1.21.0"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 12.14.6
deprecated: false
description: Self-hosted, community-driven, local OpenAI-compatible API.
home: https://truecharts.org/charts/incubator/local-ai
icon: https://truecharts.org/img/hotlink-ok/chart-icons/local-ai.png
keywords:
- local-ai
- ai
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: local-ai
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/local-ai
- https://github.com/go-skynet/LocalAI
type: application
version: 0.0.1
annotations:
truecharts.org/catagories: |
- ai
truecharts.org/SCALE-support: "true"
+1
View File
@@ -0,0 +1 @@
# README
@@ -0,0 +1 @@
imageSelector: image
@@ -0,0 +1 @@
imageSelector: cublasCuda11FfmpegImage
@@ -0,0 +1 @@
imageSelector: cublasCuda11Image
@@ -0,0 +1 @@
imageSelector: cublasCuda12FfmpegImage
@@ -0,0 +1 @@
imageSelector: cublasCuda12Image
@@ -0,0 +1 @@
imageSelector: ffmpegImage
Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

+190
View File
@@ -0,0 +1,190 @@
# Include{groups}
portals: {}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
- variable: imageSelector
label: Select Image
schema:
type: string
default: image
enum:
- value: image
description: Image
- value: ffmpegImage
description: FFmpeg
- value: cublasCuda12Image
description: Cublas Cuda 12
- value: cublasCuda12FfmpegImage
description: Cublas Cuda 12 FFmpeg
- value: cublasCuda11Image
description: Cublas Cuda 11
- value: cublasCuda11FfmpegImage
description: Cublas Cuda 11 FFmpeg
# Include{containerBasic}
# Include{containerAdvanced}
- variable: localai
group: App Configuration
label: LocalAI Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: build_type
label: Build Type
description: Specify a build type.
schema:
type: string
default: "openblas"
enum:
- value: openblas
description: Openblas
- value: cublas
description: Cublas
- value: clblas
description: Clblas
- variable: rebuild
label: Rebuild
description: Set to false to disable rebuilding from source.
schema:
type: boolean
default: false
- variable: go_tags
label: Go Tags
schema:
type: string
default: "stablediffusion"
show_if: [[rebuild, "=", true]]
enum:
- value: stablediffusion
description: Stable Diffusion
- value: tts
description: TTS
- variable: context_size
label: Context Size
description: Default models context size.
schema:
type: string
default: "512"
- variable: debug
label: Debug
description: Enable Debug Mode.
schema:
type: boolean
default: true
- variable: cors_settings
label: Show Cors Policy Settings
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: CORS
label: Enable CORS
schema:
type: boolean
default: true
- variable: CORS_ALLOW_ORIGINS
label: Cors Allows Origins
schema:
type: string
required: true
default: "*"
# Include{containerConfig}
# Include{podOptions}
# Include{serviceRoot}
- variable: main
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# 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: 8080
required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: models
label: App Models Storage
description: Stores the Application Models.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: images
label: App Images Storage
description: Stores the Application Images.
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}
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
@@ -0,0 +1 @@
{{ include "tc.v1.common.loader.all" . }}
+96
View File
@@ -0,0 +1,96 @@
image:
repository: tccr.io/truecharts/local-ai
pullPolicy: IfNotPresent
tag: v1.21.0@sha256:ab2b3e391effc9a4c5bde8add39e060e9b46558491599550bbb423da191f0461
ffmpegImage:
repository: tccr.io/truecharts/local-ai-ffmpeg
pullPolicy: IfNotPresent
tag: v1.21.0@sha256:bdf5ad52dd91f7eb45f231172c38c08716000c2a0dcdd5f029e939ac78076543
cublasCuda12Image:
repository: tccr.io/truecharts/local-ai-cublas-cuda12
pullPolicy: IfNotPresent
tag: v1.21.0-cublas@sha256:b081e33b37252b71ef5f2c1e78cbbb8530d850693cbcf853ced6d2a43c9d98be
cublasCuda12FfmpegImage:
repository: tccr.io/truecharts/local-ai-cublas-cuda12-ffmpeg
pullPolicy: IfNotPresent
tag: v1.21.0-cublas-cuda12@sha256:61f25376a200298898e8e47a2a98584fd8a1dd2206a6139cd42fa2686a7371f0
cublasCuda11Image:
repository: tccr.io/truecharts/local-ai-cublas-cuda11
pullPolicy: IfNotPresent
tag: v1.21.0-cublas@sha256:f62226611d79d7c3278ff51609d79d26f0da8aa399a2eb91a0e0e7e68e0a561b
cublasCuda11FfmpegImage:
repository: tccr.io/truecharts/local-ai-cublas-cuda11-ffmpeg
pullPolicy: IfNotPresent
tag: v1.21.0-cublas-cuda11@sha256:09935552112e52bc40fb11a106c54132c8fc8f1b534a04c4cd3580082f4339f1
securityContext:
container:
runAsNonRoot: false
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
service:
main:
ports:
main:
protocol: http
port: 8080
localai:
# Specify a build type. Available: cublas, openblas, clblas.
build_type: "openblas"
rebuild: false
# requires REBUILD=true | stablediffusion, tts
# stablediffusion: image generation with stablediffusion
# tts: enables text-to-speech with go-piper
go_tags: "stablediffusion"
context_size: "512"
debug: true
cors: true
cors_allow_origins: "*"
# galleries: [{"name":"model-gallery", "url":"github:go-skynet/model-gallery/index.yaml"}]
# UPLOAD_LIMIT
workload:
main:
podSpec:
containers:
main:
probes:
liveness:
enabled: true
type: http
path: /readyz
readiness:
enabled: true
type: http
path: /readyz
startup:
enabled: true
type: http
path: /readyz
imageSelector: image
env:
ADDRESS: ":{{ .Values.service.main.ports.main.port }}"
MODELS_PATH: "{{ .Values.persistence.models.mountPath }}"
IMAGE_PATH: "{{ .Values.persistence.images.mountPath }}"
BUILD_TYPE: "{{ .Values.localai.build_type }}"
REBUILD: "{{ .Values.localai.rebuild }}"
GO_TAGS: "{{ .Values.localai.go_tags }}"
CONTEXT_SIZE: "{{ .Values.localai.context_size }}"
DEBUG: "{{ .Values.localai.debug }}"
CORS: "{{ .Values.localai.cors }}"
CORS_ALLOW_ORIGINS: "{{ .Values.localai.cors_allow_origins }}"
persistence:
models:
enabled: true
mountPath: "/models"
images:
enabled: true
mountPath: "/images"
portal:
open:
enabled: false