用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill model-deployment命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
| name | model-deployment |
| description | Deploys machine learning models to production using containers and orchestration tools. |
| metadata | {"author":"alphaonedev"} |
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.
resources: limits: cpu: 2.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
model.h5) and write a Dockerfile.Pattern 2: Update an existing deployment
Always verify cluster access before starting; check with kubectl get nodes to ensure connectivity.
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
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.
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.
kubectl logs <pod-name> and ensure resources match in deployment YAML, e.g., add resources: requests: memory: "1Gi".KUBECONFIG=~/.kube/config, and test with kubectl get pods.$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}")
Source: alphaonedev/openclaw-graph — distributed by TomeVault.