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 duringcog build. Takes precedence over build.sdk_version in cog.yaml.
Specifies the source of the cog Python SDK wheel to install.
| Value | Description |
|---|---|
pypi | Install latest version from PyPI |
pypi:0.12.0 | Install specific version from PyPI |
dist | Use wheel from dist/ directory (requires git repo) |
https://... | Install from URL |
/path/to/wheel.whl | Install from local file path |
- Release builds: Installs latest cog from PyPI
- Development builds: Auto-detects wheel in
dist/directory, falls back to latest PyPI
Examples
The
dist option searches for wheels in:./dist/(current directory)$REPO_ROOT/dist/(if REPO_ROOT is set)<git-repo-root>/dist/(viagit 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.Specifies the source of the coglet wheel to install.
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
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.Set to any value to disable automatic update checks.
COG_NO_UPDATE_CHECK environment variable to any value: