You can customize the CPU and RAM of your sandbox template via E2B CLI.

You need to create a sandbox template first.

During the build step, you can specify the CPU and RAM of your sandbox template.

The following command will create a sandbox template with 2 vCPUs and 2GB RAM.

Bash
e2b template build -c "/root/.jupyter/start-up.sh" --cpu-count 2 --memory-mb 2048

Through Configuration File

You can also specify the vCPU and RAM specifications for the sandbox template in the e2b.toml file in the same directory where you run the e2b template build command.

Toml
template_id = "0r0efkbfwzfp9p7qpc1c"
dockerfile = "e2b.Dockerfile"
template_name = "my-agent-sandbox"
ready_cmd = "<your-ready-command>"
# Specify sandbox template vCPU and RAM specifications as 2 vCPUs and 2GB RAM
cpu_count = 2
memory_mb = 2_048