Add E2B.
This commit is contained in:
19
backend/container/e2b.Dockerfile
Normal file
19
backend/container/e2b.Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
# e2b template build --name "terminal"
|
||||
|
||||
# Use a Debian-based base image
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Install dependencies and customize sandbox
|
||||
RUN apt update \
|
||||
&& apt install -y sudo
|
||||
|
||||
# Install xterm
|
||||
RUN apt update \
|
||||
&& apt install -y xterm
|
||||
|
||||
RUN apt update \
|
||||
&& apt install -y tmux screen
|
||||
|
||||
# Clean up
|
||||
RUN apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
14
backend/container/e2b.toml
Normal file
14
backend/container/e2b.toml
Normal file
@ -0,0 +1,14 @@
|
||||
# This is a config for E2B sandbox template.
|
||||
# You can use 'template_id' (ne8xtb57tq5xw9vwhdyc) or 'template_name (terminal) from this config to spawn a sandbox:
|
||||
|
||||
# Python SDK
|
||||
# from e2b import Sandbox
|
||||
# sandbox = Sandbox(template='terminal')
|
||||
|
||||
# JS SDK
|
||||
# import { Sandbox } from 'e2b'
|
||||
# const sandbox = await Sandbox.create({ template: 'terminal' })
|
||||
|
||||
dockerfile = "e2b.Dockerfile"
|
||||
template_name = "terminal"
|
||||
template_id = "ne8xtb57tq5xw9vwhdyc"
|
Reference in New Issue
Block a user