Files
wehub-resource-sync 91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:19 +08:00

72 lines
2.2 KiB
Docker

# cua-bench container for local batch processing
FROM python:3.12-slim
# Install system dependencies required by Playwright and other tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
build-essential \
python3-dev \
portaudio19-dev \
libsndfile1 \
bash \
# Playwright system dependencies
libnss3 \
libnspr4 \
libatk-bridge2.0-0 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libxss1 \
libasound2 \
libxfixes3 \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code
WORKDIR /app
# Copy the cua-bench package
COPY cua_bench /app/cua_bench
COPY pyproject.toml /app/pyproject.toml
COPY README.md /app/README.md
# Install Python dependencies and Playwright as root
RUN python -m pip install --upgrade pip && \
python -m pip install --no-cache-dir -e .[all] && \
playwright install --with-deps chromium
# Install cua-agent and non torch optional deps
RUN python -m pip install --no-cache-dir soundfile cua-agent[qwen,omni,gemini] && \
python -m pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp-proto-http
# Create a non-root user and set ownership
RUN useradd -m -u 1000 cuauser && \
chown -R cuauser:cuauser /app && \
mkdir -p /home/cuauser/.cache && \
cp -r /root/.cache/ms-playwright /home/cuauser/.cache/ 2>/dev/null || true && \
chown -R cuauser:cuauser /home/cuauser/.cache
# Switch to non-root user
USER cuauser
# Set PATH for user installations
ENV PATH="/home/cuauser/.local/bin:$PATH"
# Create Claude settings directory and configure default permissions for the user
RUN mkdir -p ~/.claude && \
echo '{\n "permissions": {\n "defaultMode": "bypassPermissions"\n }\n}' > ~/.claude/settings.json
# CLAUDE_CODE_OAUTH_TOKEN should be passed at runtime via -e flag, not baked into image
ENV PYTHONUNBUFFERED="TRUE"
# Default command (will be overridden by batch script)
CMD ["python", "-m", "cua_bench.batch.solver"]