Skip to main content

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

The ImageBuilder class helps create and build Docker images.

Creating Custom Dockerfiles

Creating Neurenix-Specific Dockerfiles

Building Images

Image Management

The Image class provides operations for managing Docker images.

Working with Images

Container Management

The Container 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 a docker-compose.yml for multi-container deployments:

Registry Operations

Best Practices

  1. Multi-Stage Builds: Use multi-stage Dockerfiles to reduce image size
  2. Layer Caching: Order Dockerfile commands from least to most frequently changing
  3. Security: Run containers as non-root users
  4. Resource Limits: Set memory and CPU limits to prevent resource exhaustion
  5. Health Checks: Implement health check endpoints for container orchestration
  6. Logging: Use structured logging and mount log volumes
  7. Secrets Management: Use Docker secrets or environment variables for sensitive data
  8. Image Tagging: Use semantic versioning for image tags

Troubleshooting

Check Docker Installation

The container classes automatically check for Docker:

Debug Container Issues

Next Steps