Skip to main content
This guide lists the environment variables that change how Cog functions.

Build-time Variables

These environment variables affect how Cog builds Docker images.

COG_SDK_WHEEL

Controls which cog Python SDK wheel is installed in the Docker image during cog build. Takes precedence over build.sdk_version in cog.yaml.
COG_SDK_WHEEL
string
Specifies the source of the cog Python SDK wheel to install.
Supported values:
ValueDescription
pypiInstall latest version from PyPI
pypi:0.12.0Install specific version from PyPI
distUse wheel from dist/ directory (requires git repo)
https://...Install from URL
/path/to/wheel.whlInstall from local file path
Default behavior:
  • Release builds: Installs latest cog from PyPI
  • Development builds: Auto-detects wheel in dist/ directory, falls back to latest PyPI

Examples

COG_SDK_WHEEL=pypi:0.11.0 cog build
The dist option searches for wheels in:
  1. ./dist/ (current directory)
  2. $REPO_ROOT/dist/ (if REPO_ROOT is set)
  3. <git-repo-root>/dist/ (via git rev-parse, useful when running from subdirectories)

COGLET_WHEEL

Controls which coglet wheel is installed in the Docker image. Coglet is the Rust-based prediction server.
COGLET_WHEEL
string
Specifies the source of the coglet wheel to install.
Supported values: Same as COG_SDK_WHEEL Default behavior: For development builds, auto-detects a wheel in dist/. For release builds, installs the latest version from PyPI. Can be overridden with an explicit value.

Examples

COGLET_WHEEL=dist cog build

Runtime Variables

These environment variables affect how Cog runs.

COG_NO_UPDATE_CHECK

By default, Cog automatically checks for updates and notifies you if there is a new version available.
COG_NO_UPDATE_CHECK
string
Set to any value to disable automatic update checks.
To disable this behavior, set the COG_NO_UPDATE_CHECK environment variable to any value:
COG_NO_UPDATE_CHECK=1 cog build  # runs without automatic update check
This is useful in CI/CD environments where update notifications are not necessary.

Build docs developers (and LLMs) love