Skip to content

awslabs/ml-container-creator

ML Container Creator

ML Container Creator

Simplify your machine learning deployments on AWS SageMaker

Why ML Container Creator?

GitHub Pages site -- ML Container Creator

Deploying machine learning models to production shouldn't be complicated. ML Container Creator eliminates the complexity of creating SageMaker Bring Your Own Container (BYOC) deployments, letting you focus on what matters most - your models.

Perfect for:

  • Data scientists who want to deploy models without DevOps overhead
  • ML engineers building production model serving pipelines
  • Teams standardizing their ML deployment process
  • Organizations moving from prototype to production

What is SageMaker BYOC?

Amazon SageMaker Bring Your Own Container (BYOC) lets you deploy custom machine learning models using your own Docker containers. This gives you full control over your model's runtime environment while leveraging SageMaker's managed infrastructure for hosting and scaling.

πŸ“‹ What You Get with ml-container-creator

Every generated project includes:

  • SageMaker-compatible container with health checks and invocation endpoints
  • Local testing suite to validate before deployment
  • Sample model and training code to illustrate the deployment
  • AWS deployment scripts for ECR and SageMaker
  • Multi-framework support (sklearn, XGBoost, TensorFlow, vLLM, SGLang)

Note: This tool generates starter code. Review and customize for your production requirements.

Prerequisites

Before you begin, ensure you have:

  • An AWS account with SageMaker access
  • Basic familiarity with Docker and command line
  • A trained machine learning model ready for deployment

πŸš€ Get Started in Minutes

# Install Yeoman and the generator
cd ml-container-creator
npm install -g yo
npm link

# Generate your project
yo

Answer a few questions about your model, and get a complete container with:

  • Optimized model serving (Flask or FastAPI)
  • Built-in testing and deployment scripts
  • Support for SageMaker AI managed endpoint hosting

Example: Deploy a scikit-learn Model

  1. Prepare your model: Save as model.pkl
  2. Generate container: Run yo and choose ml-container-creator
  3. Configure: Choose sklearn β†’ pkl β†’ flask
  4. Deploy: Run ./deploy.sh your-sagemaker-role-arn

πŸ› οΈ Requirements

For Users

  • Node.js 24+
  • Python 3.8+
  • Docker 20+
  • AWS CLI 2+

For Contributors

  • mise - Development environment manager
  • All tools are automatically managed via mise.toml

🌟 Open Source & Community Driven

ML Container Creator is open source under the Apache 2.0 license.

πŸ—ΊοΈ Live Roadmap

Our development is driven by user needs. Check out our live roadmap to:

  • See what's coming next
  • Vote on features you need
  • Contribute ideas and feedback
  • Track progress on requested features

Current priorities:

  • Enhanced transformer model support
  • Multi-model endpoints
  • Auto-scaling configurations
  • Cost optimization features

🀝 Contributing

We welcome contributions of all sizes! Whether you're:

  • Reporting bugs or requesting features
  • Improving documentation
  • Adding support for new frameworks
  • Optimizing performance

Your input shapes the future of this tool.

Development Setup

This project uses mise for development environment management:

# Quick contribution setup
git clone https://github.com/awslabs/ml-container-creator
cd ml-container-creator

# Install mise (if not already installed)
curl https://mise.run | sh

# Install project dependencies and tools
mise install
mise run install

# Available development tasks
mise run test     # Run unit tests
mise run lint     # Run linting

# Make your changes and submit a PR!

Running Tests

# Run unit tests
npm test

# Run tests in watch mode (for development)
npm run test:watch

# Run tests with coverage
npm run test:coverage

# Run only unit tests (skip security audit)
npx mocha test/unit.test.js

Alternative Setup (Manual)

If you prefer not to use mise:

# Clone and setup
git clone https://github.com/awslabs/ml-container-creator
cd ml-container-creator

# Ensure Node.js 24.11.1+ is installed
node --version

# Install dependencies
npm install
npm link

# Run development tasks
npm test              # Run unit tests
npm run test:watch    # Run tests in watch mode
npm run lint          # Run linting
npm run validate      # Run full validation (lint + test)

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

πŸ“š Documentation

πŸ“– Full Documentation Site - Complete guides, examples, and API reference

Quick Links

For Contributors

Examples

πŸ†˜ Support & Troubleshooting

Get Help

Quick Troubleshooting

Container fails to start

# Check logs
docker logs your-container-name

# See detailed solutions
# https://github.com/awslabs/ml-container-creator/blob/main/docs/TROUBLESHOOTING.md#container-wont-start

SageMaker deployment fails

# Check CloudWatch logs
aws logs tail /aws/sagemaker/Endpoints/your-endpoint --follow

# See detailed solutions
# https://github.com/awslabs/ml-container-creator/blob/main/docs/TROUBLESHOOTING.md#endpoint-creation-failed

Need more help? Check the full troubleshooting guide

Made with ❀️ by the ML community, for the ML community

About

No description, website, or topics provided.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE-THIRD-PARTY

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •