infinity icon indicating copy to clipboard operation
infinity copied to clipboard

Helm charts for K8s deployment of Infinity

Open indranilr opened this issue 1 year ago โ€ข 3 comments

Although dockerized deployments are supported, an official helm chart would be very handy for K8s deployments. Is this already available ?

indranilr avatar Jul 21 '24 22:07 indranilr

Currently, there are no Helm charts available for deploying Infinity on Kubernetes. To create a Helm chart for Infinity, follow these steps:

  1. Create Directory Structure:

    mkdir -p helm/infinity/templates
    touch helm/infinity/Chart.yaml helm/infinity/values.yaml helm/infinity/templates/deployment.yaml helm/infinity/templates/service.yaml
    
  2. Define Chart Metadata (helm/infinity/Chart.yaml):

    apiVersion: v2
    name: infinity
    description: A Helm chart for Kubernetes deployment of Infinity
    version: 0.1.0
    
  3. Set Default Values (helm/infinity/values.yaml):

    image:
      repository: michaelf34/infinity
      tag: latest
    service:
      type: ClusterIP
      port: 80
    
  4. Create Deployment Template (helm/infinity/templates/deployment.yaml):

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: infinity
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: infinity
      template:
        metadata:
          labels:
            app: infinity
        spec:
          containers:
          - name: infinity
            image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
            ports:
            - containerPort: {{ .Values.service.port }}
            env:
            - name: MODEL_ID
              value: "BAAI/bge-small-en-v1.5"
            - name: PORT
              value: "80"
    
  5. Create Service Template (helm/infinity/templates/service.yaml):

    apiVersion: v1
    kind: Service
    metadata:
      name: infinity
    spec:
      type: {{ .Values.service.type }}
      ports:
      - port: {{ .Values.service.port }}
        targetPort: 80
      selector:
        app: infinity
    
  6. Package and Deploy:

    helm package helm/infinity
    helm install infinity ./infinity-0.1.0.tgz
    

References

/.github/ISSUE_TEMPLATE/bug-report.yml /.github/ISSUE_TEMPLATE /docs/docs/deploy.md /.github/ISSUE_TEMPLATE/new-model-addition.yml /.github/workflows/release.yaml /README.md /docs/docs /docs/assets/openapi.json /docs/docs/index.md /docs /libs/infinity_emb/tests/data/benchmark /docs/assets /.github/ISSUE_TEMPLATE/feature-request.yml /libs/infinity_emb /libs/infinity_emb/Makefile /libs/infinity_emb/README.md /docs/benchmarks/simple_app.py /libs/infinity_emb/tests/end_to_end/test_authentication.py /docs/benchmarks /libs/infinity_emb/tests/end_to_end/test_optimum_embedding.py /libs /libs/infinity_emb/tests/data /.github/workflows/ci.yaml /.github

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a ๐Ÿ‘ if this is helpful and ๐Ÿ‘Ž if it is irrelevant.

Ask Greptile ยท Edit Issue Bot Settings

greptile-apps[bot] avatar Jul 21 '24 22:07 greptile-apps[bot]

I agree, but have not used helm recently. There is no helm chart available, potentially the infra folder could be a suitable place?

michaelfeil avatar Jul 21 '24 22:07 michaelfeil

I am working on finishing the KubeAI integration that allows you to deploy Infinity easily on K8s: https://github.com/substratusai/kubeai

PR that's soon to be merged: https://github.com/substratusai/kubeai/pull/197

samos123 avatar Sep 22 '24 14:09 samos123