Eks Genai 标志

Eks Genai

组织
aws-samples
eks-genai

只要有人在 Amazon EKS 上设计、构建、训练、微调或提供生成式 AI/LLM 工作负载服务,就应使用此技能。常见说法包括“GPU vs Trainium/Inferentia”“在 EKS 上运行 vLLM”“Ray Serve / KubeRay”“在 EKS 上进行分布式训练”“用于机器学习的 FSx for Lustre”“用于 GPU 的 Karpenter”“EFA / NCCL 多节点”“DCGM / Neuron Monitor”“LiteLLM / AI 网关”“在 EKS 上搭建 RAG”“在 EKS 上运行智能体 AI”或“自行托管 Llama / Mistral / Qwen”。逐层讲解这套有明确主张的 6 层架构(计算 → 集群/调度器 → 框架 → 存储 → 可观测性 → AI 网关)、GPU 与 Neuron 的选择、JARK + vLLM + LiteLLM 标准参考架构、KV 缓存分层、成本优化手段(Neuron、Spot、Capacity Blocks),以及不可妥协的安全基线。即使用户没有提到“GenAI”,只要涉及 EKS 上的 GPU/Neuron、推理服务或分布式训练决策,都应触发此技能。仅使用 SageMaker 或 Bedrock(不自行托管)的需求,以及不涉及 AI/ML 工作负载的一般集群设计/构建需求不适用(请使用 eks-design / eks-build)。

Add to TypingMind

概览

发布者aws-samples
代码仓库sample-apex-skills
技能名称eks-genai
星标数
90
复刻数
20
附带文件
12
许可协议MIT-0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 12 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 aws-samples 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Eks Genai AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/aws-samples/sample-apex-skills/tree/main/skills/eks-genai
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aws-samples/sample-apex-skills.git /tmp/sample-apex-skills
mkdir -p .claude/skills
cp -r /tmp/sample-apex-skills/skills/eks-genai .claude/skills/eks-genai
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Eks Genai,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Eks Genai。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Eks Genai 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

GenAI on Amazon EKS

End-to-end opinionated guidance for running generative AI / LLM workloads on Amazon EKS, structured as a 6-layer stack from compute hardware up through the AI gateway. This skill is opinionated: it recommends one AWS-canonical reference stack — the JARK stack (JupyterHub + Argo + Ray + Karpenter) extended with vLLM serving and a LiteLLM gateway — and surfaces the alternatives plus the customer-context flags that justify deviating.

Two sources are the canonical foundation and every recommendation must align with one or both: the EKS AI/ML Best Practices guide and the awslabs/ai-on-eks reference implementation. For "how do I run a single EKS cluster well" (compute, networking, upgrades) use eks-best-practices; for designing/building the cluster itself use eks-design / eks-build. This skill is the GenAI workload layer on top.

When to Use This Skill

Activate when the user wants to:

  • Choose GenAI hardware — NVIDIA GPU (p5/g6/g6e) vs AWS Neuron (Trainium/Inferentia)
  • Serve an LLM (vLLM, Ray Serve, Triton, KServe) or run distributed training/fine-tuning on EKS
  • Design GPU/Neuron scheduling (Karpenter NodePools, device plugins, EFA, Capacity Blocks, Spot)
  • Pick ML storage (FSx for Lustre, Mountpoint S3 CSI, EFS, S3 Vectors) or wire GPU/Neuron observability
  • Stand up an AI gateway (LiteLLM/Envoy), RAG pipeline, or agentic platform on EKS
  • Optimize GenAI cost (Neuron migration, Spot+checkpoint, KV-cache tiering, consolidation)

Don't use this skill for:

  • SageMaker-only or Bedrock-only (no self-hosting) — defer to ML/Bedrock guidance; this skill covers Bedrock only as a gateway target alongside self-hosted models
  • "Is EKS the right base?" not yet decided — run container-service selection first
  • Generic cluster design/build with no AI/ML workload → eks-design / eks-build
  • Self-service golden paths / Internal Developer Platform for ML teams (Backstage templates, ML-pipelines-as-a-service, multi-tenant self-serve) → eks-platform-engineering. This skill is the GenAI workload layer (how to serve/train the model); platform-engineering is the self-service delivery layer (how teams request it). Ray Serve can appear in both — use this skill for the serving architecture, that one for the golden-path wrapper.
  • Generic Kubernetes concepts (Claude knows these)

The 6-Layer Stack

text
Layer 6  AI Gateway / App   LiteLLM · Envoy AI Gateway · RAG · Bedrock AgentCore · Strands
Layer 5  Observability      DCGM Exporter · Neuron Monitor · Prometheus/Grafana · AMP/AMG
Layer 4  Storage            FSx for Lustre · Mountpoint S3 CSI · EFS · S3 Vectors
Layer 3  Frameworks         Ray + KubeRay · vLLM · Triton/Dynamo · Kubeflow/KServe (JARK)
Layer 2  Cluster/Scheduler  Karpenter · NVIDIA + Neuron device plugins · EFA · Capacity Blocks
Layer 1  Compute/Hardware   NVIDIA GPU (p5/g6/g6e) · AWS Neuron (Trainium/Inferentia)

Walk the customer bottom-up (Layer 1 → 6) on first engagement; revisit top-down for optimization. Each layer below gives the decision rule; depth is in the references.

Layer 1 — Compute / Hardware (the single most-impactful decision)

For Transformer-family LLMs, evaluate AWS Neuron first when the workload permits it; it often wins on price-performance. Do not reflexively pick NVIDIA GPU (the most common SA mistake).

  • Default to AWS Neuron (Trn2/Trn1 training, Inf2 inference) when the model is Transformer-family (Llama, Mistral, Qwen, Falcon) + framework is PyTorch/vLLM + cost-conscious + the team can absorb a 1-2 week compilation ramp. Up to ~50% cost-to-train (Trainium) / ~40% better price-performance (Inferentia2).
  • Default to NVIDIA GPU (g6/g6e inference, p5/p5e training) for fastest time-to-first-success, CUDA-only dependencies, novel/non-Transformer architectures, or multi-modal models.

Right hardware = f(workload type × model family × latency × cost posture × team skill × timeline) — never one dimension alone. Full instance matrix + MIG/time-slicing: compute-hardware.md.

Layer 2 — Cluster / Scheduler

Karpenter is the only recommended autoscaler for GPU/Neuron (Cluster Autoscaler is not). Provision two NodePools (GPU + Neuron) from day one so future hardware migration is a cost experiment, not a re-architecture. Use EKS-optimized accelerated AMIs (Bottlerocket/AL2023) so drivers are pre-installed. Multi-node training needs EFA + NUMA pinning + static CPU manager (bandwidth halves without them) and NCCL/MPI in the image. Use the Neuron device plugin for EKS Auto Mode and dynamic Karpenter provisioning; the DRA driver (K8s 1.34+) is supported on Karpenter static-capacity NodePools, managed node groups, and self-managed nodes (not Auto Mode, not dynamic provisioning). Guarantee planned training capacity with Capacity Blocks for ML. Spot rule: training only with checkpoint/resume; inference On-Demand. Details: cluster-and-scheduling.md.

Layer 3 — Orchestration / Frameworks (most opinionated layer)

Default to the JARK stack + vLLM. vLLM is the default LLM inference engine (PagedAttention, OpenAI-compatible, GPU + Neuron via neuronx-distributed-inference); Ray + KubeRay is the default for distributed training and multi-replica serving. Reach for Triton (multi-framework/TensorRT), Dynamo (disaggregated prefill/decode), Kubeflow (full MLOps), or KServe (scale-to-zero) only when their specific flag applies. Decision table: inference-serving.md and distributed-training.md.

Layer 4 — Storage

Default → Mountpoint for S3 CSI for inference (lazy-load weights, per-pod cache) + FSx for Lustre for training (sub-ms, EFA-connected, S3 DRA for checkpoint offload). Use EFS only for shared multi-model weights, and S3 Vectors for cost-efficient RAG vector storage. Critical rule: FSx in the same AZ as the GPU/Neuron nodes — cross-AZ latency dwarfs FSx's native performance. Pre-warm FSx before launching Spot capacity. Details: storage.md.

Layer 5 — Observability

GenAI observability adds three first-class concerns over standard EKS: accelerator utilization/memory, per-token/per-request latency, and per-workload cost attribution. Stack: NVIDIA DCGM Exporter (GPU) + AWS Neuron Monitor (Trn/Inf) → Prometheus → Grafana, with vLLM metrics (TTFT, time-per-output-token, queue time). Use Amazon Managed Prometheus + Managed Grafana in production; keep observability pods off the GPU/Neuron nodes. Details: observability.md.

Layer 6 — AI Gateway / Application

For multi-model (self-hosted + Bedrock) serving, a gateway is non-negotiable. Default → LiteLLM (OpenAI-compatible proxy, per-tenant rate limiting + token cost accounting, Langfuse tracing); Envoy AI Gateway when you need L7 routing at ingress. For RAG, default the vector store to Bedrock Knowledge Bases (or S3 Vectors for cost) unless self-managed is required. For agents, default to Bedrock AgentCore (managed) or Strands Agents SDK for self-hosted. Details: ai-gateway.md, agentic-and-rag.md.

The Opinionated Reference Stack

The AWS-canonical default, shipped end-to-end in awslabs/ai-on-eks and the GenAI-on-EKS workshops:

LayerDefaultNotes
ComputeNeuron (Inf2/Trn2) for Transformer LLMs; g6/g6e or p5 for GPUProvision both NodePools
SchedulerKarpenter + device plugin + (EFA for multi-node)Bottlerocket/AL2023 accelerated AMI
ServingvLLM (+ Ray Serve for scale)OpenAI-compatible; Run:ai Streamer to stream weights from S3
TrainingRay Train / PyTorch FSDPFSx for Lustre + S3 DRA checkpointing
StorageMountpoint S3 CSI (inference) + FSx Lustre (training)EFS for shared weights; S3 Vectors for RAG
ObservabilityDCGM / Neuron Monitor → Prometheus → Grafana + AMP/AMGvLLM + Ray dashboards
GatewayLiteLLM (+ Langfuse)Routes self-hosted + Bedrock
OptimizationLMCache KV-cache tiering (L1 CPU / L2 Valkey)Prefix-cache reuse across pods

Pointing customers at the awslabs/ai-on-eks blueprints is the fastest credible path from idea to production. The current NVIDIA workshop validates this stack on EKS Auto Mode (K8s 1.34, a workshop-pinned snapshot; deploy the latest supported EKS version) with g6e (L40S), vLLM + KubeRay, Strands Agents, LMCache, and kube-prometheus-stack + AMP. Concrete versions and use-case → blueprint mapping: reference-implementations.md.

Security Baseline (non-negotiable)

Every GenAI-on-EKS recommendation MUST include: EKS Pod Identity / IRSA for pod credentials (never static keys); ECR image scanning; secrets via Secrets Manager/Parameter Store + Secrets Store CSI (never baked into images); model artifact provenance (image signing or Hugging Face checksum verification); private subnets for GPU/Neuron nodes with VPC endpoints for S3/Bedrock; audit logging to CloudTrail/CloudWatch; and Pod Security Admission restricted + CIS-hardened AMI for regulated/shared clusters. Details and compliance regimes: security-and-compliance.md.

Cost Optimization

Savings levers in priority order: (1) Capacity Blocks for planned multi-day training; (2) Neuron over GPU for supported architectures; (3) Spot + Karpenter + checkpointing for fault-tolerant training; (4) MIG / time-slicing for shared dev clusters; (5) Karpenter consolidation for off-peak inference; (6) KV-cache tiering + S3 lazy-load. Always give directional ranges with caveats — never point estimates. Details: kv-cache-and-cost.md.

Top Guardrails (the high-cost mistakes)

  • Don't default to NVIDIA GPU — evaluate Neuron first for Transformer LLMs.
  • Don't use Spot for training without checkpoint/resume — guaranteed cost-burn.
  • Don't recommend Cluster Autoscaler for new GenAI clusters — Karpenter only.
  • Never suggest Karpenter can purchase or create a Capacity Block (or ODCR) — it only consumes pre-existing reservations. The customer buys the CB manually; Karpenter launches into it.
  • Don't put FSx for Lustre cross-AZ from the compute nodes.
  • Don't skip NUMA pinning + static CPU manager on EFA multi-node training.
  • Don't pull model weights from Hugging Face at every pod start — pre-cache to S3/FSx.
  • Don't skip the AI gateway for multi-model deployments, or the security baseline ever.
  • Don't give point cost estimates — directional ranges with caveats only.

How to Use the References

Progressive disclosure — the essentials are above; load a reference only when the task needs that depth:

ReferenceLoad when the task is about…
compute-hardware.mdGPU vs Neuron, instance families, MIG/time-slicing
cluster-and-scheduling.mdKarpenter NodePools, device plugins, EFA/NUMA, Capacity Blocks, Spot, Auto Mode
inference-serving.mdvLLM, Ray Serve, Triton, Dynamo, KServe, model loading
distributed-training.mdRay Train, PyTorch DDP/FSDP, checkpointing, EFA/NCCL, gang scheduling
storage.mdFSx Lustre, Mountpoint S3 CSI, EFS, S3 Vectors, model artifacts
observability.mdDCGM, Neuron Monitor, Prometheus/Grafana, AMP/AMG, vLLM metrics
ai-gateway.mdLiteLLM, Envoy AI Gateway, routing, rate limiting, Open WebUI
agentic-and-rag.mdBedrock AgentCore, Strands, LangGraph, RAG, vector stores, Langfuse
kv-cache-and-cost.mdLMCache KV-cache tiering, prefix caching, cost levers
security-and-compliance.mdPod Identity/IRSA, ECR scanning, secrets, provenance, compliance regimes
reference-implementations.mdai-on-eks blueprints, workshops, concrete validated stack + versions
use-cases.mdWorked end-to-end scenarios (inference, training, Neuron migration, agentic, hybrid) with 30/60/90 build paths

Sources

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Eks Genai AI 技能有什么作用?

只要有人在 Amazon EKS 上设计、构建、训练、微调或提供生成式 AI/LLM 工作负载服务,就应使用此技能。常见说法包括“GPU vs Trainium/Inferentia”“在 EKS 上运行 vLLM”“Ray Serve / KubeRay”“在 EKS 上进行分布式训练”“用于机器学习的 FSx for Lustre”“用于 GPU 的 Karpenter”“EFA / NCCL 多节点”“DCGM / Neuron Monitor”“LiteLLM / AI 网关”“在 EKS 上搭建 RAG”“在 EKS 上运行智能体 AI”或“自行托管 Llama / Mistral / Qwen”。逐层讲解这套有明确主张的 6 层架构(计算 → 集群/调度器 → 框架 → 存储 → 可观测性 → AI 网关)、GPU 与 Neuron 的选择、JARK + vLLM + LiteLLM 标准参考架构、KV 缓存分层、成本优化手段(Neuron、Spot、Capacity Blocks),以及不可妥协的安全基线。即使用户没有提到“GenAI”,只要涉及 EKS 上的 GPU/Neuron、推理服务或分布式训练决策,都应触发此技能。仅使用 SageMaker 或 Bedrock(不自行托管)的需求,以及不涉及 AI/ML 工作负载的一般集群设计/构建需求不适用(请使用...

为什么在 TypingMind 中使用 Eks Genai?

因为您只需安装一次,就能搭配任何模型使用。Eks Genai 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Eks Genai?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/aws-samples/sample-apex-skills/tree/main/skills/eks-genai。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Eks Genai?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Eks Genai 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Eks Genai 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Eks Genai AI 技能免费吗?

是的。aws-samples 已在 GitHub 上根据 MIT-0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇