← ClaudeAtlas

build-modelslisted

Package and build custom AI models with Cog for deployment on Replicate. Use when creating a cog.yaml or predict.py, defining model inputs and outputs, loading model weights at setup time, building Docker images for ML models, serving locally with cog serve or cog predict, or porting a HuggingFace, GitHub, or ComfyUI model to run on Replicate. Trigger on phrases like "build a model", "package a model", "create a Cog model", "wrap a model", "containerize an AI model", "predict.py", "cog.yaml", "BasePredictor", or "Cog container", and when referencing cog.run, github.com/replicate/cog, or github.com/replicate/cog-examples. Covers GPU and CUDA setup, pget for fast weight downloads, async predictors with continuous batching, streaming outputs, and cold-boot optimization for image, video, audio, and LLM models. For pushing built models to Replicate, see publish-models. For running existing models, see run-models.
bertbertov/claude-stack · ★ 0 · AI & Automation · score 72
Install: claude install-skill bertbertov/claude-stack
## Docs - Cog reference (single file): <https://cog.run/llms.txt> - `cog.yaml` reference: <https://cog.run/yaml> - Python predictor reference: <https://cog.run/python> - Examples: <https://github.com/replicate/cog-examples> - Template: <https://github.com/replicate/cog-template> ## When to use this skill - You have model code, weights, or a HuggingFace/GitHub project you want to host on Replicate. - You're writing or editing a `cog.yaml`, `predict.py`, or `train.py`. - For pushing a built model to Replicate, see `publish-models`. - For running existing Replicate models, see `run-models`. ## Prerequisites - Docker running locally. - Cog installed: `brew install replicate/tap/cog` or `sh <(curl -fsSL https://cog.run/install.sh)`. - Optional: `cog init` to scaffold `cog.yaml` and `predict.py`. ## Project layout The canonical Replicate model layout: ``` cog.yaml predict.py weights.py # optional download helpers requirements.txt cog-safe-push-configs/ default.yaml # see publish-models skill .github/workflows/ ci.yaml script/ # github.com/github/scripts-to-rule-them-all lint test push ``` ## cog.yaml essentials A modern config for a GPU model: ```yaml build: gpu: true cuda: "12.8" python_version: "3.12" python_requirements: requirements.txt system_packages: - libgl1 - libglib2.0-0 predict: predict.py:Predictor ``` Notes: - Pin Python to a specific minor version, and pin every line in `requiremen