Tip
We provide a public E2B sandbox template. Follow this step if you want to reproduce.
For the E2B sandbox service, we recommend setting up a Linux Docker image with a comprehensive set of apt and Python packages pre-installed. Without these pre-installed packages, the agent will need to spend extra steps and context installing them, resulting in reduced token efficiency.
you need to have npm install and docker running locally.
- Install
e2bcommand line and login:
## install e2b
npm install -g @e2b/cli
## check that it is available
which e2b - Download our pre-configured Dockerfile: e2b.Dockerfile.
wget https://github.com/MiroMindAI/MiroFlow/blob/main/docs/e2b.Dockerfile- Run
e2b template buildcommand check official doc here, useall_pip_apt_pkgas the name of template.
## build the template with `docker build` locally
E2B_ACCESS_TOKEN=${your-token}
e2b template build -c "/root/.jupyter/start-up.sh" -n "all_pip_apt_pkg" -d ./e2b.Dockerfile
## check that template is built successfully
E2B_ACCESS_TOKEN=${your-token} e2b template listFor additional information, please see the E2B Docker documentation.