Cog

Cog packages machine learning models into containers to support deployment across environments.

github.com/replicate/cog
Cog homepage screenshot

About Cog

Cog is an open-source tool for packaging machine learning models as Docker containers. It is maintained in the replicate/cog repository and is described as containers for machine learning. Packaged models can be deployed to your own infrastructure or to Replicate, anywhere Docker images run.

With Cog, you define the model environment in a cog.yaml file, including GPU use, system packages, Python version, and Python requirements. You define how the model runs in a Python file using a runner class with typed inputs and outputs. Cog uses these definitions to generate a Docker image, create an OpenAPI schema, validate inputs and outputs, and provide an HTTP inference server for predictions. Commands support local runs, building images, and serving models for HTTP requests.

Cog suits researchers and developers who need to move a trained model into a container for testing or deployment. It is relevant for users working with CUDA, PyTorch, TensorFlow, and Python dependencies who want a defined build and prediction interface.

Key features

  • Package machine learning models in Docker containers
  • Define environment in cog.yaml configuration file
  • Define model inputs and outputs in Python
  • Generate OpenAPI schema and validate inputs
  • Provide HTTP server for model predictions
  • Deploy to own infrastructure or Replicate
Best for: Researchers and developers who need to package machine learning models for deployment in Docker environments.
Good for
  • Open-source container workflow for ML models
  • Defines environment and prediction interface in code
  • Supports local run, build, and serve commands

Cog at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

Cog alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in AI Infrastructure & MLOps

Well-known listings from the same topic.

All 341

Cog FAQ

What is Cog?
Cog is an open-source tool that packages machine learning models in standard, production-ready containers.
How do you use Cog to package a model?
You define the environment in cog.yaml and the model interface in a Python runner file, then use commands to run, build, or serve the model.
Where can you deploy a Cog model?
You can deploy a packaged model to your own infrastructure or to Replicate, anywhere Docker images run.
Is Cog open source?
Yes, Cog is developed as an open-source repository on GitHub.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing