본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)33k · #8569

infrastructure-skypilot

하는 일

SkyPilot을 쓰면 AI 모델 학습 같은 무거운 계산 작업을 하나의 지시 세트로 여러 클라우드 제공업체에서 실행할 수 있습니다. 대형 작업을 돌리면서 클라우드 비용을 줄이고 싶은 사람을 위한 스킬입니다.

사용하는 경우

  • ✓학습이나 배치 작업을 둘 이상의 클라우드 제공업체에서 실행해야 할 때.
  • ✓중단되면 자동으로 다시 시작되는 저렴한 스팟 인스턴스를 쓰고 싶을 때.
  • ✓여러 제공업체의 GPU 비용을 비교하고 한 곳에 묶이는 것을 피하고 싶은 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/infrastructure-skypilot/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/infrastructure-skypilot/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지금 가장 저렴한 클라우드에서 실행되도록 제 모델 학습 작업을 설정해 주시겠어요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

사용자는 필요한 머신과 실행할 작업을 설명합니다. SkyPilot은 가격 기준으로 가장 맞는 제공업체와 지역을 확인하고 머신을 시작하며, 머신이 멈추면 작업을 복구할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

SkyPilot Multi-Cloud Orchestration

Comprehensive guide to running ML workloads across clouds with automatic cost optimization using SkyPilot.

When to use SkyPilot

Use SkyPilot when:

  • Running ML workloads across multiple clouds (AWS, GCP, Azure, etc.)
  • Need cost optimization with automatic cloud/region selection
  • Running long jobs on spot instances with auto-recovery
  • Managing distributed multi-node training
  • Want unified interface for 20+ cloud providers
  • Need to avoid vendor lock-in

Key features:

  • Multi-cloud: AWS, GCP, Azure, Kubernetes, Lambda, RunPod, 20+ providers
  • Cost optimization: Automatic cheapest cloud/region selection
  • Spot instances: 3-6x cost savings with automatic recovery
  • Distributed training: Multi-node jobs with gang scheduling
  • Managed jobs: Auto-recovery, checkpointing, fault tolerance
  • Sky Serve: Model serving with autoscaling

Use alternatives instead:

  • Modal: For simpler serverless GPU with Python-native API
  • RunPod: For single-cloud persistent pods
  • Kubernetes: For existing K8s infrastructure
  • Ray: For pure Ray-based orchestration

Quick start

Installation

pip install "skypilot[aws,gcp,azure,kubernetes]"

# Verify cloud credentials
sky check

Hello World

Create hello.yaml:

resources:
  accelerators: T4:1

run: |
  nvidia-smi
  echo "Hello from SkyPilot!"

Launch:

sky launch -c hello hello.yaml

# SSH to cluster
ssh hello

# Terminate
sky down hello

Core concepts

Task YAML structure

# Task name (optional)
name: my-task

# Resource requirements
resources:
  cloud: aws              # Optional: auto-select if omitted
  region: us-west-2       # Optional: auto-select if omitted
  accelerators: A100:4    # GPU type and count
  cpus: 8+                # Minimum CPUs
  memory: 32+             # Minimum memory (GB)
  use_spot: true          # Use spot instances
  disk_size: 256          # Disk size (GB)

# Number of nodes for distributed training
num_nodes: 2

# Working directory (synced to ~/sky_workdir)
workdir: .

# Setup commands (run once)
setup: |
  pip install -r requirements.txt

# Run commands
run: |
  python train.py

Key commands

Command Purpose
sky launch Launch cluster and run task
sky exec Run task on existing cluster
sky status Show cluster status
sky stop Stop cluster (preserve state)
sky down Terminate cluster
sky logs View task logs
sky queue Show job queue
sky jobs launch Launch managed job
sky serve up Deploy serving endpoint

GPU configuration

Available accelerators

# NVIDIA GPUs
accelerators: T4:1
accelerators: L4:1
accelerators: A10G:1
accelerators: L40S:1
accelerators: A100:4
accelerators: A100-80GB:8
accelerators: H100:8

# Cloud-specific
accelerators: V100:4         # AWS/GCP
accelerators: TPU-v4-8       # GCP TPUs

GPU fallbacks

resources:
  accelerators:
    H100: 8
    A100-80GB: 8
    A100: 8
  any_of:
    - cloud: gcp
    - cloud: aws
    - cloud: azure

Spot instances

resources:
  accelerators: A100:8
  use_spot: true
  spot_recovery: FAILOVER  # Auto-recover on preemption

Cluster management

Launch and execute

# Launch new cluster
sky launch -c mycluster task.yaml

# Run on existing cluster (skip setup)
sky exec mycluster another_task.yaml

# Interactive SSH
ssh mycluster

# Stream logs
sky logs mycluster

Autostop

resources:
  accelerators: A100:4
  autostop:
    idle_minutes: 30
    down: true  # Terminate instead of stop
# Set autostop via CLI
sky autostop mycluster -i 30 --down

Cluster status

# All clusters
sky status

# Detailed view
sky status -a

Distributed training

Multi-node setup

resources:
  accelerators: A100:8

num_nodes: 4  # 4 nodes × 8 GPUs = 32 GPUs total

setup: |
  pip install torch torchvision

run: |
  torchrun \
    --nnodes=$SKYPILOT_NUM_NODES \
    --nproc_per_node=$SKYPILOT_NUM_GPUS_PER_NODE \
    --node_rank=$SKYPILOT_NODE_RANK \
    --master_addr=$(echo "$SKYPILOT_NODE_IPS" | head -n1) \
    --master_port=12355 \
    train.py

Environment variables

Variable Description
SKYPILOT_NODE_RANK Node index (0 to num_nodes-1)
SKYPILOT_NODE_IPS Newline-separated IP addresses
SKYPILOT_NUM_NODES Total
자주 묻는 질문

각 클라우드 제공업체에 계정이 필요한가요?

네. SkyPilot은 사용자의 클라우드 인증 정보를 쓰며, 설정 점검에서 사용할 수 있는 제공업체를 알려 줍니다.

긴 작업에서 비용을 아낄 수 있나요?

스팟 인스턴스를 쓸 수 있어 보통 더 저렴하며, 머신을 회수당하면 작업을 다시 시작합니다. 절감 폭은 제공업체와 그때의 가용성에 따라 다릅니다.

AI 모델 학습에만 쓰나요?

주로 머신러닝 작업에 쓰이지만, 클라우드 머신에 들어가는 모든 배치 작업도 실행할 수 있습니다.

상세 정보

작성자의 원본 설명

Multi-cloud orchestration for ML workloads with automatic cost optimization. Use when you need to run training or batch jobs across multiple clouds, leverage spot instances with auto-recovery, or optimize GPU costs across providers.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8569
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬