import asyncio
from e2b import AsyncTemplate, default_build_logger
from template import template


async def main():
    await AsyncTemplate.build(
        template,
        "{{name}}",
{{#if cpuCount}}
        cpu_count={{cpuCount}},
{{/if}}
{{#if memoryMB}}
        memory_mb={{memoryMB}},
{{/if}}
        on_build_logs=default_build_logger(),
    )


if __name__ == "__main__":
    asyncio.run(main())
