Add filebrowser sidecar to localai
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tyler Perkins 2024-04-05 21:07:32 -04:00
parent 05955887c0
commit ef032e9496
Signed by: tyler
GPG Key ID: 03B27509E17EFDC8
3 changed files with 55 additions and 144 deletions

View File

@ -26,6 +26,46 @@ spec:
volumeMounts:
- mountPath: "/models"
name: models
- name: filebrowser
image: git.clortox.com/infrastructure/filebrowswer:v1.0.1
securityContext:
runAsUser: 1000
runAsGroup: 1000
env:
- name: ADMIN_PASS
valueFrom:
secretKeyRef:
name: filebrowswer-secret
key: ADMIN-PASS
- name: DEFAULT_USERNAME
value: "default"
- name: DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: filebrowswer-secret
key: DEFAULT-PASS
- name: BRANDING_NAME
value: "Model Files"
- name: AUTH_METHOD
value: "proxy"
- name: AUTH_HEADER
value: "X-Auth-User"
- name: PERM_ADMIN
value: "false"
- name: PERM_EXECUTE
value: "true"
- name: PERM_CREATE
value: "true"
- name: PERM_RENAME
value: "true"
- name: PERM_MODIFY
value: "true"
- name: PERM_DELETE
value: "true"
- name: PERM_SHARE
value: "false"
- name: PERM_DOWNLOAD
value: "true"
volumes:
- name: models
persistentVolumeClaim:

View File

@ -1,144 +0,0 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: localai
namespace: localai-ns
spec:
chart:
spec:
chart: local-ai
sourceRef:
kind: HelmRepository
name: go-skynet
namespace: flux-system
interval: 15m0s
timeout: 5m
releaseName: localai
values:
replicaCount: 1
deployment:
image:
repository: quay.io/go-skynet/local-ai # Example: "docker.io/myapp"
tag: latest
env:
threads: 4
context_size: 1024
debug: "true"
modelsPath: "/models"
download_model:
# To use cloud provided (eg AWS) image, provide it like: 1234356789.dkr.ecr.us-REGION-X.amazonaws.com/busybox
image: busybox
prompt_templates:
# To use cloud provided (eg AWS) image, provide it like: 1234356789.dkr.ecr.us-REGION-X.amazonaws.com/busybox
image: busybox
pullPolicy: IfNotPresent
imagePullSecrets: []
# - name: secret-names
## Needed for GPU Nodes
runtimeClassName: nvidia
resources:
# {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits:
cpu: 100m
memory: 2048Mi
nvidia.com/gpu: 3
# requests:
# cpu: 100m
# memory: 128Mi
# Prompt templates to include
# Note: the keys of this map will be the names of the prompt template files
promptTemplates:
{}
# ggml-gpt4all-j.tmpl: |
# The prompt below is a question to answer, a task to complete, or a conversation to respond to; decide which and write an appropriate response.
# ### Prompt:
# {{.Input}}
# ### Response:
# Models to download at runtime
models:
# Whether to force download models even if they already exist
forceDownload: false
# The list of URLs to download models from
# Note: the name of the file will be the name of the loaded model
list:
# - url: "https://gpt4all.io/models/ggml-gpt4all-j.bin"
# basicAuth: base64EncodedCredentials
initContainers: []
# Example:
# - name: my-init-container
# image: my-init-image
# imagePullPolicy: IfNotPresent
# command: ["/bin/sh", "-c", "echo init"]
# volumeMounts:
# - name: my-volume
# mountPath: /path/to/mount
sidecarContainers: []
#- name: model-file-browser
# image: my-sidecar-image
# imagePullPolicy: IfNotPresent
# ports:
# - containerPort: 1234
# Persistent storage for models and prompt templates.
# PVC and HostPath are mutually exclusive. If both are enabled,
# PVC configuration takes precedence. If neither are enabled, ephemeral
# storage is used.
persistence:
models:
enabled: true
annotations: {}
storageClass: "longhorn"
accessModes: ReadWriteMany
size: 50Gi
globalMount: /models
output:
enabled: true
annotations: {}
storageClass: "longhorn"
accessModes: ReadWriteMany
size: 1Gi
globalMount: /tmp/generated
service:
type: LoadBalancer
# If deferring to an internal only load balancer
# externalTrafficPolicy: Local
port: 80
annotations: {}
# If using an AWS load balancer, you'll need to override the default 60s load balancer idle timeout
# service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "1200"
ingress:
enabled: false
className: ""
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
nodeSelector: {}
tolerations: []
affinity: {}

View File

@ -0,0 +1,15 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: filebrowswer-secret
namespace: localai-ns
spec:
encryptedData:
ADMIN_PASS: AgAk9F2XnUWx2V/fJNlrGwoCNRpn9RjmKeR1Do8NMdwIWZNhRPdKXROgtdvQIhuxEMqWNmmGG//xhmb/gCkXfInh/5lnzqDZTB6JAi5VBaUfxw9LVqBY5vcyHNMXr9LQ9zhKf7lMVQct+3Z50mZqnulWElDpjjyPeeFjozI5Yp14Vvc9cDeWhNqTgv5O2Bf2syTTrqYBfvv1MiJi0pvVL4+jk7N44PpCbyUj/4shhrLmw1sO5JkT9MdSUMpGYFakrLIFXLpxFx67MPUeL6gttGzaPFve7vjDv2gGoZevNSB4PlerHrvtJ284HsK2U+eZuHJHdt1a67zYaYq5BhtCSVcS5wuV143e8P8pjrwJw/X8//TW/WbogYQJJNZzILQXS3r+CoyzpvBxTMdYKPzbA1/MxO7bowqUD/yrtreaJSgoKCp2wxLoREGcePwUsE59sJyOGupESGWnY2oCMsRPcIOAHjh0bbqT9Tq2X0q/xnUsR+Jye4TwPEYHbbV/IRKxTa30Tru8sba7gQuxfdHzA26WtBtzIVk7iC2ec4TN8CKLaNgJCLkIrrPbUh/ZxVYws7MiFFtHRm1DcgOEm9wtP8g+q4dXpetKy5XwMSBkL56X5mDY6YsjawezPvfAz2Bylpvb85r0prRZbqr7alXBHJYdP0LZqGhqouLwd5gtSoXnBuTRSNJEiCZJC0XRo12VBa5vJrY62isRuA4BgGQVFyrs5k0Z2UH0YQsnnVehkTx1Rg==
DEFAULT_PASS: AgAc589B+a0xfVKa0csXkKLobdWT+Dcq9M0ra4CHY+5RIRp2tyu6Riy2KV54GLwd9IdTbQWrtNcwiAGQ7r1jll2Tz04v70ypD/7O8f98Oevxvy82KM04uOiG7fhSv9SIUg2ny18GtnJFHAElAzdBTLrWCk9doDnq5DRDmR/K9x7l90yWEJeQThpvRX/FV32POwqfMmal9pcHWbjuY+AW5vksroxfap4aqPbLGQ7X+2AAXe7MJDM9h78jTaPtqbDITludmb2MB3rdWEcU7TI1yQ8PsC6Sl3/slTECDW2DF0sova/UcEhN6moTtlBI9nTpnNErCDqS645BpfElaynxyHIrVASBLgeqJFrB3ls/w+rMbUfO6dEbgfGDc7NaDov+mkR8LnIiJqIroEEXuka99M5jXfp7++qwk3RMFH9CoDTIxfZWsYT3iAk5XOTSSHAMaNIFkrSLHZSTlLRjHOvCiRnif2GBYhNPom066elwuLJI+4LIpefRzSqlWrZyiqID4UCX8guFrNT35fr26jVbIlGgTG98NJ420XlzUGDoMNQRdLs/+7DnA52mDbXmV7JdLsPMm3W87cqZa/vl57zbAOab9BoV9Y9zMVl61c/hj4VVfBDdGsy7GCgSLtFxhUllB13eac6Hi3+jD6mREgtxVm3N1Nm9EYt+HpEstoDQUpcDu979t5IcxPjzPglNwpBFegSGmR/4+Hn3rOjRcGCkDG87ZSrGkE1ljogXrWWZJQrZeQ==
template:
metadata:
creationTimestamp: null
name: filebrowswer-secret
namespace: localai-ns