Feature

Custom Templates

Build and save your own environment configurations. Pre-install packages, set variables, copy files — all cached for instant boot.

custom_template.py
1from hopx_ai import Template
2
3# Build a custom template
4template = Template.build(
5    name="my-ml-environment",
6    base="code-interpreter",
7    
8    # Pre-install packages
9    setup_commands=[
10        "pip install torch torchvision transformers",
11        "pip install scikit-learn xgboost lightgbm",
12        "pip install mlflow wandb",
13    ],
14    
15    # Set environment variables
16    env_vars={
17        "CUDA_VISIBLE_DEVICES": "0",
18        "TRANSFORMERS_CACHE": "/workspace/.cache",
19    },
20    
21    # Copy files into template
22    files={
23        "/workspace/config.yaml": "model:
24  name: bert-base",
25    }
26)
27
28print(f"Template created: {template.id}")
29print(f"Status: {template.status}")
30
31# Use your custom template
32sandbox = Sandbox.create(template="my-ml-environment")

Custom Packages

Pre-install your dependencies for faster boot times

Custom Config

Configure environment variables, system settings, and more

Version Control

Manage template versions and updates

Cached Snapshots

Templates are cached for ~100ms boot times

Build Your Environment

Create templates with your exact stack. Boot in ~100ms every time.