Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Replace qt with gtk

Dillon DuPonte4e3d63feb61
diff --git a/libs/xfce/Dockerfile b/libs/xfce/Dockerfile
index 15dd8dc953..550e3f81d1 100644
--- a/libs/xfce/Dockerfile
+++ b/libs/xfce/Dockerfile
@@ -123,8 +123,20 @@ RUN mkdir -p /home/cua/.cache && \
# Install computer-server using Python 3.12 pip
RUN python3.12 -m pip install cua-computer-server
-# Install PyQt6 and pywebview, used by cua-bench for web UIs
-RUN python3.12 -m pip install "pywebview[pyside6]"
+# Install GTK and WebKit dependencies for pywebview
+RUN apt-get update && apt-get install -y \
+ python3-gi \
+ python3-gi-cairo \
+ gir1.2-gtk-3.0 \
+ gir1.2-webkit2-4.1 \
+ libgirepository1.0-dev \
+ libcairo2-dev \
+ pkg-config \
+ gobject-introspection \
+ && rm -rf /var/lib/apt/lists/*
+
+# Install pywebview with GTK backend, used by cua-bench for web UIs
+RUN python3.12 -m pip install "pywebview[gtk]"
RUN python3.12 -m pip install cua-bench-ui>=0.7.0 --no-cache-dir
# Install playwright and Firefox dependencies
diff --git a/libs/xfce/Dockerfile.dev b/libs/xfce/Dockerfile.dev
index f1dd7f02a7..f827c777a9 100644
--- a/libs/xfce/Dockerfile.dev
+++ b/libs/xfce/Dockerfile.dev
@@ -124,8 +124,20 @@ COPY python/computer-server /tmp/computer-server
RUN python3.12 -m pip install /tmp/computer-server && \
rm -rf /tmp/computer-server
-# Install PyQt6 and pywebview, used by cua-bench for web UIs
-RUN python3.12 -m pip install "pywebview[pyside6]"
+# Install GTK and WebKit dependencies for pywebview
+RUN apt-get update && apt-get install -y \
+ python3-gi \
+ python3-gi-cairo \
+ gir1.2-gtk-3.0 \
+ gir1.2-webkit2-4.1 \
+ libgirepository1.0-dev \
+ libcairo2-dev \
+ pkg-config \
+ gobject-introspection \
+ && rm -rf /var/lib/apt/lists/*
+
+# Install pywebview with GTK backend, used by cua-bench for web UIs
+RUN python3.12 -m pip install "pywebview[gtk]"
RUN python3.12 -m pip install cua-bench-ui>=0.7.0 --no-cache-dir
# Install playwright and Firefox dependencies