用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/GoogleCloudPlatform/accelerated-platforms --skill llm-d-deploy-stack命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | llm-d-deploy-stack |
| description | Deploys the llm-d stack on GKE using well-lit paths specification. |
| version | 0.3.1 |
| allowed-tools | kubectl gcloud helm kustomize curl terraform python3 |
| mcp-servers | [{"kubernetes":{"reason":"Inspect cluster info, custom compute classes, pod statuses, and secrets."}},{"gcp":{"reason":"Verify GKE cluster status."}}] |
Follow these instructions to deploy the llm-d benchmarking stack on GKE.
This skill utilizes the following core variables:
SPEC (also referred to as strategy or guide): This represents the name of the llm-d well-lit path guide being targeted. It maps directly to GKE overlay folder structures (llmd-<spec>)
optimized-baseline (Standard optimized baseline configuration).precise-prefix-cache-routing (Includes precise cache routing for multi-turn workloads).predicted-latency-routing (Includes dynamic latency-based routing overlays).CRITICAL WARNING:
teardown-*.sh scripts (e.g., teardown-llmd-optimized-baseline.sh) when attempting to "fix and rerun" a deployment or remove a workload. These scripts default to a full core platform teardown (ACP_TEARDOWN_CORE_PLATFORM=true) and will completely destroy the GKE cluster and all its resources. If a deployment fails, debug in place or re-run the deploy scripts. ONLY run teardown script when the user explicitly asks to tear down the stack and confirm with you first.sed to inject these values into ${ACP_REPO_DIR}/platforms/gke/base/_shared_config/platform.auto.tfvars:
sed -i 's/^platform_name.*/platform_name = "<platform_name>"/g' "${ACP_REPO_DIR}/platforms/gke/base/_shared_config/platform.auto.tfvars"
# If platform_default_project_id doesn't exist, append it:
grep -q "^platform_default_project_id" "${ACP_REPO_DIR}/platforms/gke/base/_shared_config/platform.auto.tfvars" || echo "platform_default_project_id = \"\"" >> "${ACP_REPO_DIR}/platforms/gke/base/_shared_config/platform.auto.tfvars"
sed -i 's/^platform_default_project_id.*/platform_default_project_id = "<project_id>"/g' "${ACP_REPO_DIR}/platforms/gke/base/_shared_config/platform.auto.tfvars"
kubectl cluster-info
google/gemma-4-31b-itqwen/qwen3-32b (default)qwen/qwen3-32b-fp8redhatai/gemma-4-31b-it-fp8-blockrtx-pro-6000 (default)h100 (translates to nvidia-h100)h200 (translates to nvidia-h200)v6e (TPU, translates to google-tpu-v6e)sed to inject the chosen model and accelerator into ${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/llmd.auto.tfvars:
echo "llmd_model_id = \"<chosen_model>\"" >> "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/llmd-shared.auto.tfvars"
echo "llmd_accelerator_type = \"<chosen_accelerator>\"" >> "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/llmd-shared.auto.tfvars"
Ask the user: "Which llm-d well-lit path guide would you like to deploy?"
optimized-baseline (corresponds to llmd-optimized-baseline-vllm-with-hf-model.md)precise-prefix-cache-routing (corresponds to llmd-precise-prefix-cache-routing-vllm-with-hf-model.md)predicted-latency-routing (corresponds to llmd-predicted-latency-routing-vllm-with-hf-model.md)Deploy the baseline stack: Run the deployment script corresponding to the chosen guide to create the cluster (if new) and deploy the baseline infra/services:
optimized-baseline:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-optimized-baseline.sh"
precise-prefix-cache-routing:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-precise-prefix-cache-routing.sh"
predicted-latency-routing:
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/deploy-llmd-predicted-latency-routing.sh"
Run validation:
kubectl get computeclasses
Instruct the user to add their Hugging Face Read Token to Google Secret Manager and as a Kubernetes secret:
Provide them with these commands, replacing <YOUR_HUGGINGFACE_READ_TOKEN> with their actual token. Note that the source command must be run in the same shell session as the subsequent commands so the environment variables are preserved:
# Source environment variables
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
# Add to Secret Manager
HF_TOKEN_READ=<YOUR_HUGGINGFACE_READ_TOKEN>
echo ${HF_TOKEN_READ} | gcloud secrets versions add ${huggingface_hub_access_token_read_secret_manager_secret_name} --data-file=- --project=${huggingface_secret_manager_project_id}
# Add to Kubernetes
kubectl -n ${llmd_namespace} create secret generic llm-d-hf-token --from-literal=HF_TOKEN="${HF_TOKEN_READ}"
WAIT: Stop calling tools and ask the user to confirm once they add the HF token to secret manager and kubernetes secret Do not proceed until the user confirms.
Once the user confirms the token is configured, proceed with the deployment:
# Configure
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/model-download/configure_huggingface.sh"
# Apply
kubectl apply --kustomize "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/model-download/huggingface"
kubectl get job -n ${huggingface_hub_downloader_kubernetes_namespace_name}
Wait until the job status shows Complete.kubectl delete job -n ${huggingface_hub_downloader_kubernetes_namespace_name} ${HF_MODEL_ID_HASH}-hf-model-to-gcs
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-gpu/llmd-<spec>/vllm/configure_vllm.sh"
"${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-tpu/llmd-<spec>/vllm/configure_vllm.sh"
platforms/gke/base/use-cases/inference-ref-arch/kubernetes-manifests/online-inference-[gpu|tpu]/llmd-[spec]/vllm/[prefix]-[suffix]
[gpu|tpu]: Use tpu if the accelerator is v6e, otherwise gpu.[spec]: The well-lit path chosen in Section 3.[prefix]: The accelerator prefix (e.g., rtx-pro-6000, h100, , ).$llmd_namespace):
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl get pods -n ${llmd_namespace}
kubectl get svc -n ${llmd_namespace}
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl get jobs -n ${llmd_namespace}
gcloud storage ls gs://${huggingface_hub_models_bucket_name}/${llmd_model_id}/
source "${ACP_REPO_DIR}/platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/_shared_config/scripts/set_environment_variables.sh"
kubectl describe secretProviderClass huggingface-tokens -n ${llmd_namespace}
kubectl describe secret llm-d-hf-token -n ${llmd_namespace}
h200v6e[suffix]: The model name suffix (e.g., gemma-4-31b-it, qwen3-32b).kubectl apply --kustomize "${ACP_REPO_DIR}/<constructed_overlay_dir>"