#1313th of 47 in Model serving

cog

Packages Python ML models into Docker images with a generated HTTP API

Stars
9.5k
License
Apache-2.0
Last commit
Oct 2026
Last release
Oct 2026
Language
Go
Stars, last 29 weeks+219
1 Apr 2026: 9,271 stars8 Apr 2026: 9,331 stars15 Apr 2026: 9,341 stars22 Apr 2026: 9,358 stars29 Apr 2026: 9,365 stars6 May 2026: 9,368 stars13 May 2026: 9,373 stars20 May 2026: 9,377 stars27 May 2026: 9,381 stars3 Jun 2026: 9,387 stars10 Jun 2026: 9,394 stars17 Jun 2026: 9,400 stars24 Jun 2026: 9,405 stars1 Jul 2026: 9,412 stars8 Jul 2026: 9,420 stars15 Jul 2026: 9,427 stars22 Jul 2026: 9,432 stars29 Jul 2026: 9,436 stars5 Aug 2026: 9,442 stars12 Aug 2026: 9,444 stars19 Aug 2026: 9,450 stars26 Aug 2026: 9,454 stars2 Sept 2026: 9,460 stars9 Sept 2026: 9,464 stars16 Sept 2026: 9,473 stars23 Sept 2026: 9,477 stars30 Sept 2026: 9,480 stars7 Oct 2026: 9,484 stars14 Oct 2026: 9,489 stars21 Oct 2026: 9,490 stars

9,271 on 1 Apr 20269,490 on 21 Oct 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Cog builds a Docker image from a cog.yaml file and a Python class that defines a model's setup and run methods. It picks compatible CUDA, cuDNN, PyTorch, TensorFlow and Python versions, generates an OpenAPI schema from the Python type annotations, and serves a REST API from a Rust/Axum server. Images can be run on your own infrastructure or deployed to Replicate.

Who it is for: ML engineers shipping Python models as containerized HTTP services

Strengths

  • Inputs and outputs are declared in Python types; OpenAPI schema is generated and validated
  • Resolves CUDA, cuDNN, PyTorch, TensorFlow and Python version combinations automatically
  • Same cog.yaml drives local runs (cog run, cog serve) and production builds (cog build)
  • Output is a standard Docker image that runs anywhere Docker does

Weaknesses

  • Requires Docker, plus Buildx if using Docker Engine instead of Docker Desktop
  • No native Windows support; Windows 11 needs WSL 2
  • Model code must follow the BaseRunner interface, so existing serving code needs porting
  • Packages one model per container; README describes no multi-model routing or scheduling

What it needs

  • GPU optional
  • Needs Docker, Docker Buildx
  • Models: PyTorch, TensorFlow, arbitrary Python models
  • port 5000

Also in Model serving

See all 47
Also in Model serving
RankProjectScore
1LocalAISelf-hosted inference server with OpenAI-compatible API and pluggable backends49.8k starsMIT83 out of 100
2llama.cppC/C++ inference engine serving GGUF models over an OpenAI-compatible API132k starsMIT81 out of 100
3OllamaLocal model runner with CLI and REST API for open-weight LLMs184.2k starsMIT80 out of 100
#4strataRuns a 125B-parameter MoE model on one consumer GPU plus system RAM30k starsMIT79 out of 100
#5vLLMInference engine for Hugging Face LLMs with PagedAttention and continuous batching94.9k starsApache-2.077 out of 100