|
| 1 | +# Benchmarking Helm Chart |
| 2 | + |
| 3 | +This Helm chart deploys the `inference-perf` benchmarking tool. This guide will walk you through deploying a basic benchmarking job. By default, the `shareGPT` dataset is used for configuration. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Before you begin, ensure you have the following: |
| 8 | + |
| 9 | +* **Helm 3+**: [Installation Guide](https://helm.sh/docs/intro/install/) |
| 10 | +* **Kubernetes Cluster**: Access to a Kubernetes cluster |
| 11 | +* **Gateway Deployed**: Your inference server/gateway must be deployed and accessible within the cluster. |
| 12 | +* **Hugging Face Token Secret**: A Hugging Face token to pull tokenizers. |
| 13 | + |
| 14 | +## Deployment |
| 15 | + |
| 16 | +To deploy the benchmarking chart: |
| 17 | + |
| 18 | +```bash |
| 19 | +export IP='<YOUR_IP>' |
| 20 | +export PORT='<YOUR_PORT>' |
| 21 | +export HF_TOKEN='<YOUR HUGGING_FACE_TOKEN>' |
| 22 | +export CHART_VERSION=v0.2.0 |
| 23 | +helm install benchmark -f benchmark-values.yaml \ |
| 24 | + --set hftoken=${HF_TOKEN} \ |
| 25 | + --set "config.server.base_url=http://${IP}:${PORT}" \ |
| 26 | + oci://quay.io/inference-perf/charts/inference-perf:${CHART_VERSION} |
| 27 | +``` |
| 28 | + |
| 29 | +**Parameters to customize:** |
| 30 | + |
| 31 | +For more parameter customizations, refer to inference-perf [guides](https://github.com/kubernetes-sigs/inference-perf/blob/main/docs/config.md) |
| 32 | + |
| 33 | +* `benchmark`: A unique name for this deployment. |
| 34 | +* `hfToken`: Your hugging face token. |
| 35 | +* `config.server.base_url`: The base URL (IP and port) of your inference server. |
| 36 | + |
| 37 | +### Storage Parameters |
| 38 | + |
| 39 | +#### 1. Local Storage (Default) |
| 40 | + |
| 41 | +By default, reports are saved locally but **lost when the Pod terminates**. |
| 42 | +```yaml |
| 43 | +storage: |
| 44 | + local_storage: |
| 45 | + path: "reports-{timestamp}" # Local directory path |
| 46 | + report_file_prefix: null # Optional filename prefix |
| 47 | +``` |
| 48 | +
|
| 49 | +#### 2. Google Cloud Storage (GCS) |
| 50 | +
|
| 51 | +Use the `google_cloud_storage` block to save reports to a GCS bucket. |
| 52 | + |
| 53 | +```yaml |
| 54 | +storage: |
| 55 | + google_cloud_storage: # Optional GCS configuration |
| 56 | + bucket_name: "your-bucket-name" # Required GCS bucket |
| 57 | + path: "reports-{timestamp}" # Optional path prefix |
| 58 | + report_file_prefix: null # Optional filename prefix |
| 59 | +``` |
| 60 | + |
| 61 | +###### 🚨 GCS Permissions Checklist (Required for Write Access) |
| 62 | + |
| 63 | +1. **IAM Role (Service Account):** Bound to the target bucket. |
| 64 | + |
| 65 | + * **Minimum:** **Storage Object Creator** (`roles/storage.objectCreator`) |
| 66 | + |
| 67 | + * **Full:** **Storage Object Admin** (`roles/storage.objectAdmin`) |
| 68 | + |
| 69 | +2. **Node Access Scope (GKE Node Pool):** Set during node pool creation. |
| 70 | + |
| 71 | + * **Required Scope:** **`devstorage.read_write`** or **`cloud-platform`** |
| 72 | + |
| 73 | +#### 3. Simple Storage Service (S3) |
| 74 | + |
| 75 | +Use the `simple_storage_service` block for S3-compatible storage. Requires appropriate AWS credentials configured in the runtime environment. |
| 76 | + |
| 77 | +```yaml |
| 78 | +storage: |
| 79 | + simple_storage_service: |
| 80 | + bucket_name: "your-bucket-name" # Required S3 bucket |
| 81 | + path: "reports-{timestamp}" # Optional path prefix |
| 82 | + report_file_prefix: null # Optional filename prefix |
| 83 | +``` |
| 84 | + |
| 85 | +## Uninstalling the Chart |
| 86 | + |
| 87 | +To uninstall the deployed chart: |
| 88 | + |
| 89 | +```bash |
| 90 | +helm uninstall my-benchmark |
| 91 | +``` |
| 92 | + |
0 commit comments