Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问许可证需确认审计异常

model-deployment模型部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

1

周安装

17

GitHub Stars

4

下载量

140
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:model-deployment(模型部署)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/model-deployment
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill model-deployment
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill model-deployment

简介

该技能用于 ML 模型容器化与生产部署,支持 Docker 与 Kubernetes 编排。

  • 适用于实时推理服务上线、模型版本管理与滚动更新等场景。
  • 通过 GitHub 仓库安装,适用于 Codex、Claude、Cursor、Gemini CLI。
  • 部署前需验证镜像安全性与资源请求/限制配置。
  • 建议启用健康检查与自动扩缩容机制保障服务可用性。

SKILL.md

model-deployment

Purpose

This skill automates the deployment of machine learning models to production environments using containers (e.g., Docker) and orchestration tools (e.g., Kubernetes), ensuring scalable and reliable ML model serving.

When to Use

  • When you need to containerize and deploy a trained ML model for real-time inference in production.
  • For updating existing deployments in response to model retraining or performance issues.
  • In MLOps pipelines where models must be versioned, monitored, and rolled back easily.
  • When integrating with cloud providers like AWS EKS or Google GKE for managed orchestration.

Key Capabilities

  • Builds Docker images from model artifacts and deploys them to Kubernetes clusters.
  • Supports model versioning via tags and handles rolling updates for zero-downtime deployments.
  • Integrates with ML frameworks like TensorFlow or PyTorch for serving models via APIs.
  • Manages resource allocation, such as CPU/GPU requests in Kubernetes pods, e.g., resources: limits: cpu: 2.
  • Automates scaling based on traffic, using Kubernetes Horizontal Pod Autoscalers.

Usage Patterns

To use this skill, first prepare your model in a Docker-friendly format, then build and deploy it. Always set environment variables for authentication, like $KUBECONFIG for Kubernetes access.

Pattern 1: Basic deployment

  • Export your model as a saved file (e.g., model.h5) and write a Dockerfile.
  • Build the image locally or in CI/CD.
  • Apply a Kubernetes deployment YAML to orchestrate the container.

Pattern 2: Update an existing deployment

  • Tag a new model version and rebuild the Docker image.
  • Use kubectl to apply changes, specifying the new image tag.
  • Monitor the rollout and roll back if needed using built-in commands.

Always verify cluster access before starting; check with kubectl get nodes to ensure connectivity.

Common Commands/API

Use these CLI commands for core operations. For API interactions, reference Kubernetes REST API endpoints.

  • Build and tag a Docker image: docker build -t mymlmodel:v1. This creates an image from the current directory.
  • Push the image to a registry: docker push mymlmodel:v1 Requires authentication via $DOCKER_REGISTRY_TOKEN as an env var.
  • Deploy to Kubernetes: kubectl apply -f deployment.yaml Where deployment.yaml includes: apiVersion: apps/v1 kind: Deployment metadata: name: myml-deployment spec: replicas: 3, template: spec: containers: - name: model-server image: mymlmodel:v1
  • Scale the deployment: kubectl scale deployment myml-deployment --replicas=5
  • API endpoint for querying deployments: Use the Kubernetes API at GET /apis/apps/v1/namespaces/default/deployments with authentication via bearer token in $KUBE_API_TOKEN.

For config formats, use Kubernetes YAML files, e.g.:

apiVersion: v1
kind: Service
metadata: name: model-service
spec: selector: app: mymlmodel, ports: - protocol: TCP port: 80

Integration Notes

Integrate this skill with CI/CD tools like GitHub Actions or Jenkins by adding steps in your pipeline YAML. For example, in GitHub Actions:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: docker build -t mymlmodel:${{ github.sha }} .
      - run: kubectl apply -f k8s/deployment.yaml --context=$KUBE_CONTEXT

Set env vars for secrets, e.g., $GITHUB_TOKEN for repo access and $KUBE_CONTEXT for cluster selection. Ensure your ML pipeline outputs are in a standard format, like a pickled model file, for seamless Docker integration.

Error Handling

Handle common errors proactively. If docker build fails with "no such file," verify the Dockerfile path and required files. For Kubernetes errors like "image pull failed," check image registry credentials via $DOCKER_REGISTRY_TOKEN.

  • Error: Pod not ready – Fix by inspecting logs with kubectl logs <pod-name> and ensure resources match in deployment YAML, e.g., add resources: requests: memory: "1Gi".
  • Error: Authentication failure – Set env vars correctly, e.g., export KUBECONFIG=~/.kube/config, and test with kubectl get pods.
  • For API errors, like 401 Unauthorized, retry with refreshed tokens from $KUBE_API_TOKEN and use exponential backoff in scripts.

Always include try-catch in automation scripts, e.g.:

import subprocess
try:
    subprocess.run(["kubectl", "apply", "-f", "deployment.yaml"], check=True)
except subprocess.CalledProcessError as e:
    print(f"Deployment failed: {e}")

Graph Relationships

  • Related Cluster: aimlops
  • Related Tags: mlops, deployment, containers
  • Connected Skills: model-training (for pre-deployment), monitoring (for post-deployment observability)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.36%
按下载量换算45

Claude

29.42%
按下载量换算41

Cursor

20.24%
按下载量换算28

Gemini CLI

9.57%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills