Skip to main content

cirron build

Build ML models and Docker containers for your projects with intelligent project detection, validation, and registry configuration. Supports both ML model compilation and traditional application builds.

Usage

Options

Build Types

ML model builds

For projects with ML frameworks (PyTorch, TensorFlow, Scikit-learn). The command detects the target architecture, validates files and dependencies, compiles the model for the target architecture, generates artifacts and metadata, then builds a Docker image (if a Dockerfile exists) and pushes it when --push is set.

Traditional application builds

For non-ML projects with build configuration. Reads settings from cirron.yaml, sets environment variables, runs beforeBuild commands, the main build command, then afterBuild commands. Use --analyze to inspect output.

Configuration

ML project:
Traditional project:

Validation

With --validate:
  • ML projects: required files (src/model.py, requirements.txt), Python version compatibility, CUDA/GPU availability for GPU architectures, model instantiation, index file format.
  • Traditional projects: build configuration in cirron.yaml, command availability, dependencies, output directory writable.

Docker and Registry

Images are named registry/organization/project:tag. Configure with CIRRON_REGISTRY and CIRRON_ORG:
.cirronignore patterns are automatically merged into .dockerignore during build.

Environment Variables

Per-environment overrides live in cirron.yaml:

Build Output

With --analyze:

Watch Mode

Troubleshooting

Best Practices and CI/CD

  • Run --validate for production builds.
  • Choose architecture to match the target deployment hardware.
  • Use index files for complex model configurations.
  • Use --clean and meaningful --tag values for production.
  • Use .cirronignore to keep build context lean.