Cog config file
cog.yaml files
| Type | object |
|---|---|
| File match |
cog.yaml
cog.yml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/cog-config-file/latest.json |
| Source | https://raw.githubusercontent.com/replicate/cog/main/pkg/config/data/config_schema_v1.0.json |
Versions
Validate with Lintel
npx @lintel/lintel check
Defines how to build a Docker image and how to run predictions on your model inside that image.
Properties
This stanza describes how to build the Docker image your model runs in.
10 nested properties
The minor (3.13) or patch (3.13.1) version of Python to use.
Cog automatically picks the correct version of CUDA to install, but this lets you override it for whatever reason.
Cog automatically picks the correct version of cuDNN to install, but this lets you override it for whatever reason.
Enable GPUs for this model. When enabled, the nvidia-docker base image will be used, and Cog will automatically figure out what versions of CUDA and cuDNN to use based on the version of Python, PyTorch, and Tensorflow that you are using.
A list of Python packages to install, in the format package==version.
A list of setup commands to run in the environment before your Python packages are installed.
A pip requirements file specifying the Python packages to install.
A list of Ubuntu APT packages to install.
Pin the cog Python SDK version installed in the container (e.g. "0.18.0" or "0.18.0a1"). Use "prerelease" to always install the latest pre-release. Defaults to latest stable. Overridden by the COG_SDK_WHEEL environment variable.
A list of setup commands to run in the environment after your system packages and Python packages have been installed. If you're familiar with Docker, it's like a RUN instruction in your Dockerfile.
The name given to built Docker images. If you want to push to a registry, this should also include the registry name.
The pointer to the Predictor object in your code, which defines how predictions are run on your model.
The pointer to the Predictor object in your code, which defines how predictions are run on your model.
The concurrency settings for the model.
2 nested properties
The maximum number of concurrent predictions.
The default target for number of concurrent predictions. This setting can be used by an autoscaler to determine when to scale a deployment of a model up or down.
A list of environment variables to make available during builds and at runtime, in the format NAME=value
A list of weight files or directories to include in the model.