Skip to content

Commit f7f96a9

Browse files
committed
Merge remote-tracking branch 'refs/remotes/upstream/main'
# Conflicts: # README.md # docker-compose.yml
2 parents f2e0686 + 383b04a commit f7f96a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5252
-3612
lines changed

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
data
2-
tmp
2+
tmp
3+
results
4+
5+
.env

.env.example

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,27 @@ MOONSHOT_API_KEY=
2727
UNBOUND_ENDPOINT=https://api.getunbound.ai
2828
UNBOUND_API_KEY=
2929

30+
SiliconFLOW_ENDPOINT=https://api.siliconflow.cn/v1/
31+
SiliconFLOW_API_KEY=
32+
33+
IBM_ENDPOINT=https://us-south.ml.cloud.ibm.com
34+
IBM_API_KEY=
35+
IBM_PROJECT_ID=
36+
3037
# Set to false to disable anonymized telemetry
3138
ANONYMIZED_TELEMETRY=false
3239

3340
# LogLevel: Set to debug to enable verbose logging, set to result to get results only. Available: result | debug | info
3441
BROWSER_USE_LOGGING_LEVEL=info
3542

36-
# Chrome settings
37-
CHROME_PATH=
38-
CHROME_USER_DATA=
39-
CHROME_DEBUGGING_PORT=9222
40-
CHROME_DEBUGGING_HOST=localhost
43+
# Browser settings
44+
BROWSER_PATH=
45+
BROWSER_USER_DATA=
46+
BROWSER_DEBUGGING_PORT=9222
47+
BROWSER_DEBUGGING_HOST=localhost
4148
# Set to true to keep browser open between AI tasks
42-
CHROME_PERSISTENT_SESSION=false
43-
CHROME_CDP=
49+
KEEP_BROWSER_OPEN=true
50+
BROWSER_CDP=
4451
# Display settings
4552
# Format: WIDTHxHEIGHTxDEPTH
4653
RESOLUTION=1920x1080x24

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,6 @@ data/
187187

188188
# For Config Files (Current Settings)
189189
.config.pkl
190+
*.pdf
191+
192+
workflow

Dockerfile

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM python:3.11-slim
22

3+
# Set platform for multi-arch builds (Docker Buildx will set this)
4+
ARG TARGETPLATFORM
5+
ARG NODE_MAJOR=20
6+
37
# Install system dependencies
48
RUN apt-get update && apt-get install -y \
59
wget \
@@ -28,7 +32,6 @@ RUN apt-get update && apt-get install -y \
2832
fonts-liberation \
2933
dbus \
3034
xauth \
31-
xvfb \
3235
x11vnc \
3336
tigervnc-tools \
3437
supervisor \
@@ -40,47 +43,58 @@ RUN apt-get update && apt-get install -y \
4043
fonts-dejavu \
4144
fonts-dejavu-core \
4245
fonts-dejavu-extra \
46+
vim \
4347
&& rm -rf /var/lib/apt/lists/*
4448

4549
# Install noVNC
4650
RUN git clone https://github.com/novnc/noVNC.git /opt/novnc \
4751
&& git clone https://github.com/novnc/websockify /opt/novnc/utils/websockify \
4852
&& ln -s /opt/novnc/vnc.html /opt/novnc/index.html
4953

50-
# Set platform for ARM64 compatibility
51-
ARG TARGETPLATFORM=linux/amd64
54+
# Install Node.js using NodeSource PPA
55+
RUN mkdir -p /etc/apt/keyrings \
56+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
57+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
58+
&& apt-get update \
59+
&& apt-get install nodejs -y \
60+
&& rm -rf /var/lib/apt/lists/*
61+
62+
# Verify Node.js and npm installation (optional, but good for debugging)
63+
RUN node -v && npm -v && npx -v
5264

5365
# Set up working directory
5466
WORKDIR /app
5567

5668
# Copy requirements and install Python dependencies
5769
COPY requirements.txt .
70+
# Ensure 'patchright' is in your requirements.txt or install it directly
71+
# RUN pip install --no-cache-dir -r requirements.txt patchright # If not in requirements
5872
RUN pip install --no-cache-dir -r requirements.txt
5973

60-
# Install Playwright and browsers with system dependencies
61-
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
62-
RUN playwright install --with-deps chromium
63-
RUN playwright install-deps
74+
# Install Patchright browsers and dependencies
75+
# Patchright documentation suggests PLAYWRIGHT_BROWSERS_PATH is still relevant
76+
# or that Patchright installs to a similar default location that Playwright would.
77+
# Let's assume Patchright respects PLAYWRIGHT_BROWSERS_PATH or its default install location is findable.
78+
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-browsers
79+
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH
80+
81+
# Install recommended: Google Chrome (instead of just Chromium for better undetectability)
82+
# The 'patchright install chrome' command might download and place it.
83+
# The '--with-deps' equivalent for patchright install is to run 'patchright install-deps chrome' after.
84+
# RUN patchright install chrome --with-deps
85+
86+
# Alternative: Install Chromium if Google Chrome is problematic in certain environments
87+
RUN patchright install chromium --with-deps
88+
6489

6590
# Copy the application code
6691
COPY . .
6792

68-
# Set environment variables
69-
ENV PYTHONUNBUFFERED=1
70-
ENV BROWSER_USE_LOGGING_LEVEL=info
71-
ENV CHROME_PATH=/ms-playwright/chromium-*/chrome-linux/chrome
72-
ENV ANONYMIZED_TELEMETRY=false
73-
ENV DISPLAY=:99
74-
ENV RESOLUTION=1920x1080x24
75-
ENV VNC_PASSWORD=vncpassword
76-
ENV CHROME_PERSISTENT_SESSION=true
77-
ENV RESOLUTION_WIDTH=1920
78-
ENV RESOLUTION_HEIGHT=1080
79-
8093
# Set up supervisor configuration
8194
RUN mkdir -p /var/log/supervisor
8295
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
8396

84-
EXPOSE 7788 6080 5901
97+
EXPOSE 7788 6080 5901 9222
8598

8699
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
100+
#CMD ["/bin/bash"]

Dockerfile.arm64

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)