Overview
Custom templates allow you to:- Pre-install packages and dependencies
- Configure environment variables
- Set up development tools
- Create reusable environments
- Reduce setup time
Prerequisites
- API key configured (see Authentication)
- Understanding of Docker or containerization concepts
- Basic knowledge of template building
Custom template building requires API access. Check the API Reference for template building endpoints.
Understanding Templates
Templates are pre-configured VM images that define:- Base operating system
- Pre-installed packages
- Environment variables
- Default configurations
- Available tools
Building Custom Templates
Step 1: Define Template Steps
Templates are built using a step-based approach:- Python
- JavaScript/TypeScript
Step 2: Template Building Patterns
Install Python Packages
Install Python Packages
Install Node.js Packages
Install Node.js Packages
Copy Files
Copy Files
Set Environment Variables
Set Environment Variables
Set Working Directory
Set Working Directory
Example: ML Template
Create a template for machine learning workloads:- Python
- JavaScript/TypeScript
Example: Web Development Template
Create a template for web development:- Python
- JavaScript/TypeScript
Using Custom Templates
Once built, use your custom templates like any other:- Python
- JavaScript/TypeScript
Best Practices
✅ DO: Pin Package Versions
✅ DO: Pin Package Versions
Pin package versions for reproducibility:
✅ DO: Optimize Build Steps
✅ DO: Optimize Build Steps
Combine commands to reduce build time:
✅ DO: Use Specific Resources
✅ DO: Use Specific Resources
Set appropriate resources for your template:
✅ DO: Document Templates
✅ DO: Document Templates
Use descriptive alias names for clarity:

