hf-cloud-sagemaker-production-defaults
하는 일
이 스킬은 트래픽에 맞춰 확장하고 문제를 보고하도록 설정된 실제 SageMaker 모델 엔드포인트를 만듭니다. 계속 실행해 두고 나중에 디버그할 수 있는 배포를 원하는 사람들을 위한 스킬입니다.
사용하는 경우
- ✓SageMaker 엔드포인트를 곧 만들어야 할 때.
- ✓엔드포인트와 함께 자동 확장과 경보를 설정하고 싶을 때.
- ✓이미지와 역할을 알고 난 뒤 배포를 마무리하고 싶을 때.
스킬 링크
https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“선택한 모델을 자동 확장과 경보가 있는 실시간 엔드포인트로 배포해서, 계속 실행될 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 연결된 리소스 세트를 만듭니다. 모델, 엔드포인트 설정, 엔드포인트 자체, 자동 확장 대상, 지연 시간과 오류를 위한 CloudWatch 경보입니다. 데이터 캡처는 사용자가 켜지 않는 한 꺼진 상태로 둡니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
SageMaker Production Defaults
The difference between a demo endpoint and one you can leave running is: it scales with traffic, it tells you when it breaks, and you can debug it later. This skill makes those three the default rather than optional extras.
By the time this skill runs, the planner has chosen a real-time endpoint, IAM has a usable role, and image-selection has resolved a container URI + AMI version. This skill turns those into an actual deployment.
What gets created
For every endpoint, the skill creates these as a unit:
- SageMaker Model — image + env vars + execution role + S3 artifacts
- Endpoint config — instance type, initial count, optional data capture
- Endpoint — the real-time endpoint serving inference
- Autoscaling target + policy — target tracking on invocations per instance
- CloudWatch alarms — latency, errors, platform overhead
An inference-component deployment (deploy_ic.py) creates the same set with two changes: the endpoint config carries the execution role and ManagedInstanceScaling, and an inference component carries the model. Its autoscaling target is the component, not the variant.
Data capture (logging requests/responses to S3) is off by default — useful for debugging but creates ongoing S3 costs the user didn't necessarily ask for. Enable with --enable-data-capture.
All resources get a consistent tag set including CreatedBy=agentic-deploy-skills for later cleanup.
Defaults and reasoning in references/deployment-template.md.
Running the deployment
For a text-generation LLM (vLLM), first package the pinned model snapshot as a SageMaker model.tar.gz artifact and upload it to an account-controlled S3 bucket. SageMaker extracts it under /opt/ml/model, so the deployment does not fetch or execute repository code at runtime:
python scripts/deploy.py \
--model-name qwen3-medical \
--image-uri "$IMAGE_URI" \
--inference-ami-version "$AMI" \
--role-arn "$ROLE_ARN" \
--model-s3-uri "s3://<your-model-bucket>/qwen3-medical/model.tar.gz" \
--instance-type ml.g5.xlarge \
--region "$REGION" \
--env SM_VLLM_MODEL=/opt/ml/model \
--env SM_VLLM_HOST=0.0.0.0 \
--env SM_VLLM_TRUST_REMOTE_CODE=false \
--env SM_VLLM_MAX_MODEL_LEN=4096
For an embedding model (TEI, often on CPU):
python scripts/deploy.py \
--model-name bge-large-embeddings \
--image-uri "$IMAGE_URI" \
--role-arn "$ROLE_ARN" \
--instance-type ml.c6i.2xlarge \
--region "$REGION" \
--env HF_MODEL_ID=BAAI/bge-large-en-v1.5
Note: TEI deployments do not need --inference-ami-version. That flag is vLLM-specific. TEI env vars are also simpler (HF_MODEL_ID instead of SM_VLLM_*, no host or trust-remote-code to configure).
Where each value comes from:
| Parameter | Source |
|---|---|
--image-uri |
hf-cloud-serving-image-selection — agent reads from the AWS DLC catalog page |
--inference-ami-version |
hf-cloud-serving-image-selection — required for vLLM tags containing cu130+ |
--role-arn |
hf-cloud-sagemaker-iam-preflight (check_role.py) |
--region |
hf-cloud-aws-context-discovery |
--instance-type |
User input or planner recommendation |
--env |
Model-specific; see hf-cloud-serving-image-selection for required SM_VLLM_* vars |
--model-s3-uri |
Preferred for production — S3 URI of the pinned model artifact extracted to /opt/ml/model; omit only for the Hub-at-runtime exception |
The script creates resources in order with error handling, waits for InService (up to 30 min), surfaces failure reasons, registers autoscaling and alarms, and prints a summary including the teardown command. Outputs a JSON blob on stdout with endpoint/config/model names for downstream scripting.
The scripts ship with this skill. If the installed copy is missing the scripts/ directory (some harnesses copy only SKILL.md on install), fetch them from the source repo rather than re-implementing them from this description.
Model-loading default: pre-stage pinned weights in S3 and pass --model-s3-uri; the container loads them from /opt/ml/model without a runtime Hub dependency. Loading from the Hub is an explicit exception: expect a 5–15+ minute download after endpoint startup, provide a token for gated models, and keep SM_VLLM_TRUST_REMOTE_CODE=false unless the specific architecture requires reviewed custom code. deploy.py waits 30 minutes.
InServi
자주 묻는 질문
데이터 캡처가 켜져 있나요?
아닙니다. 요청과 응답을 S3에 기록하는 기능은 지속적인 저장 비용이 생기므로 기본으로 꺼져 있습니다.
자동 확장은 무엇을 하나요?
호출 수 목표를 기준으로 트래픽에 따라 인스턴스 수를 조정합니다.
엔드포인트를 0으로 줄일 수 있나요?
네. 실시간 0 스케일 옵션이 지원하는 엔드포인트 유형 중 하나입니다.
상세 정보
작성자의 원본 설명
Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with autoscaling, CloudWatch alarms, and tagging enabled by default. Use this skill whenever about to create a SageMaker endpoint, write deployment code that calls `create_endpoint`, or finalize a deployment after the image URI and IAM role are known. Provides deploy.py for real-time endpoints, deploy_ic.py for real-time endpoints that scale to zero instances via inference components, and deploy_async.py for async endpoints (also scale-to-zero). This is the last step in the SageMaker deployment workflow. Never generate
repo: huggingface/skills
인기도
- GitHub 스타
- 11k
- 순위
- #11770
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 30.
댓글
- …
이 저장소의 다른 스킬
hf-cli
11k에이전트가 hf 명령줄 도구로 Hugging Face Hub의 모델, 데이터셋, Space, 저장소를 내려받고 올리며 로컬 캐시를 관리하도록 돕습니다.
hf-cloud-aws-context-discovery
11k에이전트가 클라우드 작업 전에 AWS 프로필, 리전, 계정 정보를 찾아, 어느 계정을 쓸지 추측하지 않도록 돕습니다.
hf-cloud-python-env-setup
11k에이전트가 SageMaker나 AWS 자동화를 실행하기 전에 적절한 Python 버전과 최신 라이브러리가 있는 깔끔한 Python 환경을 만들도록 돕습니다.
hf-cloud-sagemaker-deployment-planner
11k에이전트가 모델을 Amazon SageMaker에 배포하는 방법을 계획하고, 실시간, 서버리스, 비동기, 배치 호스팅 중 합리적인 기본값으로 고르도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.