From a6d69d1876f44fd22f02ddaad4a9269ba23d7748 Mon Sep 17 00:00:00 2001 From: James Murdza Date: Thu, 31 Oct 2024 19:05:05 -0600 Subject: [PATCH] Add useful and userland apps for Anthropic computer use demo See: https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo/Dockerfile --- template/e2b.Dockerfile | 49 +++++++++++++++++++++++++++++++++++++++++ template/e2b.toml | 9 ++++---- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/template/e2b.Dockerfile b/template/e2b.Dockerfile index 829907c..7e1e1b8 100644 --- a/template/e2b.Dockerfile +++ b/template/e2b.Dockerfile @@ -55,3 +55,52 @@ COPY ./Xauthority /home/user/.Xauthority COPY ./start-up.sh / RUN chmod +x /start-up.sh + +RUN apt-get update && \ + apt-get -y upgrade && \ + apt-get -y install \ + build-essential \ + # UI Requirements + xvfb \ + xterm \ + xdotool \ + scrot \ + imagemagick \ + sudo \ + mutter \ + x11vnc \ + # Python/pyenv reqs + build-essential \ + libssl-dev \ + zlib1g-dev \ + libbz2-dev \ + libreadline-dev \ + libsqlite3-dev \ + curl \ + git \ + libncursesw5-dev \ + xz-utils \ + tk-dev \ + libxml2-dev \ + libxmlsec1-dev \ + libffi-dev \ + liblzma-dev \ + # Network tools + net-tools \ + netcat \ + # PPA req + software-properties-common && \ + # Userland apps + sudo add-apt-repository ppa:mozillateam/ppa && \ + sudo apt-get install -y --no-install-recommends \ + libreoffice \ + firefox-esr \ + x11-apps \ + xpdf \ + gedit \ + xpaint \ + tint2 \ + galculator \ + pcmanfm \ + unzip && \ + apt-get clean \ No newline at end of file diff --git a/template/e2b.toml b/template/e2b.toml index 168da37..4e4865f 100644 --- a/template/e2b.toml +++ b/template/e2b.toml @@ -1,14 +1,13 @@ # This is a config for E2B sandbox template. -# You can use template ID (k0wmnzir0zuzye6dndlw) or template name (desktop) to create a sandbox: +# You can use 'template_id' (k0wmnzir0zuzye6dndlw) or 'template_name (desktop) from this config to spawn a sandbox: # Python SDK -# from e2b import Sandbox, AsyncSandbox -# sandbox = Sandbox("desktop") # Sync sandbox -# sandbox = await AsyncSandbox.create("desktop") # Async sandbox +# from e2b import Sandbox +# sandbox = Sandbox(template='desktop') # JS SDK # import { Sandbox } from 'e2b' -# const sandbox = await Sandbox.create('desktop') +# const sandbox = await Sandbox.create({ template: 'desktop' }) template_id = "k0wmnzir0zuzye6dndlw" dockerfile = "e2b.Dockerfile"