Skip to content

Commit

Permalink
Add helm deployment instructions for codegen (#1351)
Browse files Browse the repository at this point in the history
Signed-off-by: Dolpher Du <[email protected]>
  • Loading branch information
yongfengdu authored Jan 8, 2025
1 parent 2311787 commit 5638075
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 1,482 deletions.
8 changes: 1 addition & 7 deletions CodeGen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,9 @@ docker compose up -d

Refer to the [Xeon Guide](./docker_compose/intel/cpu/xeon/README.md) for more instructions on building docker images from source.

### Deploy CodeGen using Kubernetes

Refer to the [Kubernetes Guide](./kubernetes/intel/README.md) for instructions on deploying CodeGen into Kubernetes on Xeon & Gaudi.

### Deploy CodeGen into Kubernetes using Helm Chart

Install Helm (version >= 3.15) first. Refer to the [Helm Installation Guide](https://helm.sh/docs/intro/install/) for more information.

Refer to the [CodeGen helm chart](https://github.com/opea-project/GenAIInfra/tree/main/helm-charts/codegen/README.md) for instructions on deploying CodeGen into Kubernetes on Xeon & Gaudi.
Refer to the [CodeGen helm chart](./kubernetes/helm/README.md) for instructions on deploying CodeGen into Kubernetes on Xeon & Gaudi.

## Consume CodeGen Service

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions CodeGen/kubernetes/helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Deploy CodeGen on kubernetes cluster

- You should have Helm (version >= 3.15) installed. Refer to the [Helm Installation Guide](https://helm.sh/docs/intro/install/) for more information.
- For more deploy options, refer to [helm charts README](https://github.com/opea-project/GenAIInfra/tree/main/helm-charts#readme).

## Deploy on Xeon

```
export HFTOKEN="insert-your-huggingface-token-here"
helm install codegen oci://ghcr.io/opea-project/charts/codegen --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} -f cpu-values.yaml
```

## Deploy on Gaudi

```
export HFTOKEN="insert-your-huggingface-token-here"
helm install codegen oci://ghcr.io/opea-project/charts/codegen --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} -f gaudi-values.yaml
```
9 changes: 9 additions & 0 deletions CodeGen/kubernetes/helm/cpu-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

image:
repository: opea/codegen
tag: "latest"

tgi:
LLM_MODEL_ID: Qwen/Qwen2.5-Coder-7B-Instruct
28 changes: 28 additions & 0 deletions CodeGen/kubernetes/helm/gaudi-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

tgi:
accelDevice: "gaudi"
LLM_MODEL_ID: Qwen/Qwen2.5-Coder-7B-Instruct
image:
repository: ghcr.io/huggingface/tgi-gaudi
tag: "2.0.6"
resources:
limits:
habana.ai/gaudi: 1
MAX_INPUT_LENGTH: "1024"
MAX_TOTAL_TOKENS: "2048"
CUDA_GRAPHS: ""
livenessProbe:
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
startupProbe:
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
failureThreshold: 120
48 changes: 0 additions & 48 deletions CodeGen/kubernetes/intel/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions CodeGen/kubernetes/intel/cpu/xeon/manifest/README_react_ui.md

This file was deleted.

Loading

0 comments on commit 5638075

Please sign in to comment.