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 aDockerfile exists) and pushes it when --push is set.
Traditional application builds
For non-ML projects with build configuration. Reads settings fromcirron.yaml, sets environment variables, runs beforeBuild commands, the main build command, then afterBuild commands. Use --analyze to inspect output.
Configuration
ML 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 namedregistry/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
--analyze:
Watch Mode
Troubleshooting
Best Practices and CI/CD
- Run
--validatefor production builds. - Choose architecture to match the target deployment hardware.
- Use index files for complex model configurations.
- Use
--cleanand meaningful--tagvalues for production. - Use
.cirronignoreto keep build context lean.