Quick Reference
| Command | Description |
|---|---|
| cog init | Initialize a new Cog project |
| cog build | Build a Docker image from cog.yaml |
| cog predict | Run a prediction on your model |
| cog run | Run a command inside a Docker environment |
| cog serve | Start an HTTP prediction server |
| cog push | Build and push an image to a registry |
| cog train | Run a training job |
| cog login | Log in to a container registry |
Global Flags
These flags are available on all commands:Show debugging output
Show help for any command
Show version of Cog
Installation
Install Cog using Homebrew on macOS:Getting Started
Create acog.yaml file to define your environment:
Common Workflows
Development
- Create your
cog.yamlconfiguration - Use
cog runto test commands in the environment - Use
cog predictto test predictions locally
Testing
Production
Next Steps
- Learn about cog build to create Docker images
- Learn about cog predict to run predictions
- Learn about cog serve to start an HTTP server
- See the cog.yaml reference for configuration options