Overview
Neurenix provides comprehensive Docker integration for containerizing models and applications, making deployment and scaling easier across different environments.Quick Start
Build a Docker Image
Run a Container
ImageBuilder
TheImageBuilder class helps create and build Docker images.
Creating Custom Dockerfiles
Creating Neurenix-Specific Dockerfiles
Building Images
Image Management
TheImage class provides operations for managing Docker images.
Working with Images
Container Management
TheContainer class provides comprehensive container lifecycle management.
Container Configuration
GPU Support
Container Operations
Complete Deployment Example
Here’s a complete workflow for deploying a Neurenix model:1. Create Application Structure
2. Create Serving Script
3. Build and Deploy
Docker Compose Integration
Create adocker-compose.yml for multi-container deployments:
Registry Operations
Best Practices
- Multi-Stage Builds: Use multi-stage Dockerfiles to reduce image size
- Layer Caching: Order Dockerfile commands from least to most frequently changing
- Security: Run containers as non-root users
- Resource Limits: Set memory and CPU limits to prevent resource exhaustion
- Health Checks: Implement health check endpoints for container orchestration
- Logging: Use structured logging and mount log volumes
- Secrets Management: Use Docker secrets or environment variables for sensitive data
- Image Tagging: Use semantic versioning for image tags