Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

install chrome/firefox for headless browing when running in docker container

jimmycliff obonyo23e703132653
diff --git a/Dockerfile b/Dockerfile
index 9886d74266..039ccf26a9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,6 +5,16 @@ FROM python:3.11-slim
RUN apt-get -y update
RUN apt-get -y install git chromium-driver
+# Install Xvfb and other dependencies for headless browser testing
+RUN apt-get update \
+ && apt-get install -y wget gnupg2 libgtk-3-0 libdbus-glib-1-2 dbus-x11 xvfb ca-certificates
+
+# Install Firefox / Chromium
+RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
+ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
+ && apt-get update \
+ && apt-get install -y chromium firefox-esr
+
# Set environment variables
ENV PIP_NO_CACHE_DIR=yes \
PYTHONUNBUFFERED=1 \