Skip to main content
Configure templates with resources, build steps, commands, environment variables, and ready checks. Template configuration determines the final sandbox environment.

Prerequisites

Before you begin, make sure you have:
  • Understanding of template building - Familiarity with Building Templates is required
  • Template builder SDK - Python SDK with template builder (from hopx_ai.template import Template)
  • Resource requirements - Know your CPU, memory, and disk requirements
  • Build steps - Plan your installation commands and file operations

Overview

Template configuration includes:
  • Resource specifications (CPU, memory, disk)
  • Build steps (commands, file operations)
  • Environment variables
  • Working directories and users
  • Start commands and ready checks
  • Port exposure and health checks
Template configuration is set during template building. Once built, templates are immutable - create a new template to change configuration.

Resource Configuration

Configure template resources:

Build Steps

Configure build steps for template:

Start Command and Ready Checks

Configure start command and ready checks:

Port Exposure

Expose ports for services:

Complete Configuration Example

Here’s a complete template configuration:

Best Practices

1

1. Configure Resources First

Set appropriate CPU, memory, and disk based on your application requirements.
2

2. Order Build Steps

Order build steps logically: system packages → language packages → application setup.
3

3. Use Ready Checks

Always set ready checks for services that need to be ready before use.
4

4. Set Environment Variables

Configure environment variables during template build for consistency.
5

5. Expose Required Ports

Expose all ports your application needs to be accessible.

Next Steps