Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3.0.0] Major Version - PVC updates and sidecars #34

Merged
merged 4 commits into from
Dec 30, 2023
Merged

[v3.0.0] Major Version - PVC updates and sidecars #34

merged 4 commits into from
Dec 30, 2023

Conversation

lenaxia
Copy link

@lenaxia lenaxia commented Dec 20, 2023

Hi, this is a major update to enable fixing #32 while also making the helm chart more flexible for those who need to make changes.

This is intended to supersede #33.

Specifically:

  • the images tag is now broken down into repository and tag fields to enable better automation for upgrading container
  • persistence is now a top level field, moved out from under models to reflect the ability to define more volumes
  • arbitrary volumes can now be defined under persistence, and will be default mounted to /, but can also be mounted using a globalMount option. This also prevents the recurrence of issues like Image generation issue #32 which cannot be fixed without a helm chart update
  • initContainers and sidecarContainers allow creating or adding additional containers to do more work if desired
  • download-models initContainer now also ensures that /tmp/generated/images and /tmp/generated/audio (for tts) are created

The values.yaml has been updated, and I highlight the updates below:

deployment:
  image:
    repository: quay.io/go-skynet/local-ai  # Example: "docker.io/myapp"
    tag: latest 
    
# 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: []
# Example:
# - name: my-sidecar-container
#   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: hoatPath
    accessModes: ReadWriteMany
    size: 10Gi
    globalMount: /models # if not defined, it will mount to /models
  output:
    enabled: true
    annotations: {}
    storageClass: hostPath
    accessModes: ReadWriteMany
    size: 5Gi
    globalMount: /tmp/generated

Copy link
Member

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, great contribution @lenaxia , thanks!

@mudler mudler merged commit 370e51f into go-skynet:main Dec 30, 2023
@mudler
Copy link
Member

mudler commented Dec 30, 2023

mh, this is breaking here with:

Helm upgrade failed: template: local-ai/templates/pvcs.yaml:3:8: executing                                          │
│       "local-ai/templates/pvcs.yaml" at <include "local-ai.pvc" (dict "name" (printf                                              │
│       "%s-%s" (include "local-ai.fullname" $) $key) "namespace" $.Release.Namespace                                               │
│       "labels" (include "local-ai.labels" $) "annotations" $pvc.annotations "storageClass"                                        │
│       $pvc.storageClass "accessModes" $pvc.accessModes "size" $pvc.size)>: error calling                                          │
│       include: template: local-ai/templates/_pvc.yaml:7:13: executing "local-ai.pvc"                                              │
│       at <include "local-ai.labels" .labels>: error calling include: template: local-ai/templates/_helpers.tpl:37:18:             │
│       executing "local-ai.labels" at <include "local-ai.chart" .>: error calling include:                                         │
│       template: local-ai/templates/_helpers.tpl:30:25: executing "local-ai.chart"                                                 │
│       at <.Chart.Name>: can''t evaluate field Chart in type string'  

@lenaxia
Copy link
Author

lenaxia commented Dec 30, 2023

Hmm, okay, will take a look shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants