技能 编程开发 CoreWeave本地开发部署流程

CoreWeave本地开发部署流程

v20260423
coreweave-local-dev-loop
本指南旨在为CoreWeave GPU部署提供完整的本地开发工作流。它涵盖了从本地构建Docker容器、使用kubectl进行YAML清单的预验证(dry-run),到最终部署AI推理服务所需的完整流程和最佳实践。
获取技能
455 次下载
概览

CoreWeave Local Dev Loop

Overview

Local development workflow for CoreWeave: build containers, test YAML manifests with dry-run, push to registry, and deploy to CoreWeave CKS.

Prerequisites

  • Completed coreweave-install-auth setup
  • Docker installed locally
  • Container registry access (Docker Hub, GHCR, or CoreWeave registry)

Instructions

Step 1: Project Structure

my-inference-service/
├── Dockerfile
├── src/
│   ├── server.py          # Inference server code
│   └── model_config.py    # Model configuration
├── k8s/
│   ├── deployment.yaml    # GPU deployment manifest
│   ├── service.yaml       # Service and ingress
│   └── hpa.yaml           # Horizontal pod autoscaler
├── scripts/
│   ├── build.sh           # Build and push container
│   └── deploy.sh          # Deploy to CoreWeave
├── .env.local
└── Makefile

Step 2: Build and Push Container

# Build locally
docker build -t my-inference:latest .

# Tag for registry
docker tag my-inference:latest ghcr.io/myorg/my-inference:v1.0.0

# Push
docker push ghcr.io/myorg/my-inference:v1.0.0

Step 3: Validate Manifests Before Deploy

# Dry-run against CoreWeave cluster
kubectl apply -f k8s/deployment.yaml --dry-run=server

# Diff against current state
kubectl diff -f k8s/deployment.yaml

# Check resource requests match available GPU types
kubectl get nodes -l gpu.nvidia.com/class=A100_PCIE_80GB --no-headers | wc -l

Step 4: Deploy and Watch

kubectl apply -f k8s/
kubectl rollout status deployment/my-inference
kubectl logs -f deployment/my-inference

Error Handling

Error Cause Solution
Image pull backoff Wrong registry or no pull secret Create imagePullSecret
CUDA mismatch Driver vs container version Match CUDA version to node drivers
Dry-run fails Invalid manifest Fix YAML syntax

Resources

Next Steps

See coreweave-sdk-patterns for inference client patterns.

信息
Category 编程开发
Name coreweave-local-dev-loop
版本 v20260423
大小 2.77KB
更新时间 2026-04-26
语言