stapi

by Substratus

Helm chartv0.1.2App v2.2.2-3Verified publisher

A Helm chart for deploying STAPI, an OpenAI compatible Embedding API using Sentence Transformers.

About this chart

stapi Helm Chart

A Helm chart for deploying STAPI, an OpenAI compatible Embedding API using Sentence Transformers.

See substratusai/stapi GitHub repo for more info.

Usage

Basic usage:

helm repo add substratusai https://substratusai.github.io/helm
# Note by default CPU only is used
helm install stapi-minilm-l6-v2 substratusai/stapi \
  --set model=all-MiniLM-L6-v2

Utilizing GPU and specifying a nodeSelector to target GPU family

Create a file named values.yaml with following content:

model: all-MiniLM-L6-v2
resources:
  limits:
    nvidia.com/gpu: 1
nodeSelector:
  cloud.google.com/gke-accelerator: nvidia-l4

Install using Helm:

helm install stapi-gpu substratusai/stapi \
    -f values.yaml

Default Values

Take a look at the default values.yaml:

replicaCount: 1
# Change this if you want to serve another model
model: all-MiniLM-L6-v2

# Override the resources if you need more
resources:
  requests:
    cpu: 500m
    memory: "512Mi"
#  limits:
#    nvidia.com/gpu: 1


# Override env variables
env: {}
port: 8080

# Add nodeSelectors to target specific GPU types
nodeSelector: {}
#  E.g. for GCP L4 cloud.google.com/gke-accelerator: nvidia-l4

image:
  repository: ghcr.io/substratusai/stapi
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podAnnotations: {}

podSecurityContext: {}

securityContext: {}

service:
  type: ClusterIP
  port: 80

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

tolerations: []

affinity: {}

Deploy stapi with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has stapi on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartstapi is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply