Repository for dip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
service-catalog/manifests/helm/vllm/0.0.11/CUSTOM-README.md

4.5 KiB

VLLM 배포

1. 배포 방법

1) 배포시 주의 사항

  • VLLM은 모델을 정의하지 않을 경우 API Gateway 역할을 하는 Router만 배포된다.
  • Model을 정의할때 리소스를 잘 정의해야 한다.(CPU, Memory, Disk, GPU)

2) 배포 방법

git clone https://github.com/paasup/dip-catalog.git
cd charts/vllm
helm upgrade vllm ./ -f custom-values.yaml  --install -n vllm --create-namespace

2.custom-values.yaml 설명

  • custom-values.yaml에 정의된 값에 대한 설명이다.

1) 모델 배포 설정 (Optional)

Name 설명 기본값
modelSpec.name 배포할 모델의 이름 ""
modelSpec.repository Image의 경로 ""
modelSpec.tag Image의 tag "latest"
modelSpec.modelURL 배포할 모델의 URL(HuggingSpace 기준) ""
modelSpec.replicaCount replicaCount 정의 "1"
modelSpec.requestCPU POD의 CPU Request 값 "10"
modelSpec.requestMemory POD의 Moemory Request 값 "64Gi"
modelSpec.requestGPU POD의 GPU Request 값 "1"
modelSpec.pvcStorage PVC의 용량 설정 "50Gi"
modelSpec.pvcAccessMode pvcAccessMode 정의 "[]"
modelSpec.storageClass 사용할 Storage Class 값 ""
modelSpec.vllmConfig.maxModelLen 모델이 한 번에 처리할 수 있는 최대 시퀀스 길이(토큰 수)를 설정 "16384"
modelSpec.vllmConfig.dtype 모델 계산에 사용될 데이터 타입을 설정 "bfloat16"
modelSpec.vllmConfig.extraArgs 모델 실행 시 추가적인 커맨드 라인 인자를 설정 "custom-values.yaml 참고"

2) VLLM Router 배포 설정

  • VLLM 실행 시에 필요한 설정을 작성한다.
Name 설명 기본값
routerSpec.repository Router의 images 경로 "lmcache/lmstack-router"
routerSpec.tag Image의 tag 'latest'
routerSpec.enableRouter Router 활성화 여부 'true'

3) Ingress 설정

3.1) tls 시크릿 직접 생성

  • Rancher에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.

    ingress:
    enabled: true
      hosts:
      - host: vllm.example.org
        paths:
        - path: /
          pathType: Prefix
      tls: 
      -  hosts:
        - vllm.example.org
        secretName: vllm-tls-secret
    
  • ingress 사용을 위해서는 인증서를 secret으로 제공해야한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다.

    kubectl create secret tls vllm-tls-secret --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
    

3.2) cert-manager를 이용한 자동 생성

  • cert manager를 통해 인증서 자동 생성 시 custom-values.yaml 수정한다.

  • ingress.annotations.cert-manager.io/cluster-issuer에 미리 배포된 Cluster Issuer의 이름으로 변경한다.

    ingress:
      enabled: true
      className: ""
      annotations:
        cert-manager.io/cluster-issuer: "selfsigned-issuer" 
        cert-manager.io/duration: 8760h  
        cert-manager.io/renew-before: 720h
      hosts:
      - host: vllm.example.org
        paths:
        - path: /
          pathType: Prefix
      tls: 
      -  hosts:
         - vllm.example.org
         secretName: vllm-tls-secret