wairiah commited on
Commit
61054b9
·
verified ·
1 Parent(s): b62d1e4

Deploy Real Agent Army

Browse files
Files changed (1) hide show
  1. Dockerfile +50 -7
Dockerfile CHANGED
@@ -1,14 +1,57 @@
1
  FROM python:3.9-slim
2
 
3
- # Install Chrome for browser automation
4
- RUN apt-get update && apt-get install -y gnupg wget
5
- RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
6
- RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
7
- RUN apt-get update && apt-get install -y google-chrome-stable && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- # Configure display for headless Chrome
 
 
 
 
 
 
 
10
  ENV DISPLAY=:99
11
  ENV PYTHONUNBUFFERED=1
 
12
 
13
  # Copy requirements first for better caching
14
  COPY requirements.txt .
@@ -23,7 +66,7 @@ RUN mkdir -p logs state
23
  # Make supervisor executable
24
  RUN chmod +x supervisor.py
25
 
26
- # Health check (simplified)
27
  HEALTHCHECK --interval=60s --timeout=30s --start-period=120s --retries=3 \
28
  CMD ps aux | grep -v grep | grep "supervisor.py" || exit 1
29
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install Chrome and dependencies for browser automation
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ wget \
6
+ gnupg \
7
+ ca-certificates \
8
+ fonts-liberation \
9
+ libasound2 \
10
+ libatk-bridge2.0-0 \
11
+ libatk1.0-0 \
12
+ libc6 \
13
+ libcairo2 \
14
+ libcups2 \
15
+ libdbus-1-3 \
16
+ libexpat1 \
17
+ libfontconfig1 \
18
+ libgbm1 \
19
+ libgcc1 \
20
+ libglib2.0-0 \
21
+ libgtk-3-0 \
22
+ libnspr4 \
23
+ libnss3 \
24
+ libpango-1.0-0 \
25
+ libpangocairo-1.0-0 \
26
+ libstdc++6 \
27
+ libx11-6 \
28
+ libx11-xcb1 \
29
+ libxcb1 \
30
+ libxcomposite1 \
31
+ libxcursor1 \
32
+ libxdamage1 \
33
+ libxext6 \
34
+ libxfixes3 \
35
+ libxi6 \
36
+ libxrandr2 \
37
+ libxrender1 \
38
+ libxss1 \
39
+ libxtst6 \
40
+ lsb-release \
41
+ xdg-utils \
42
+ && rm -rf /var/lib/apt/lists/*
43
 
44
+ # Add Chrome repository and install Chrome
45
+ RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
46
+ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
47
+ apt-get update && \
48
+ apt-get install -y --no-install-recommends google-chrome-stable && \
49
+ rm -rf /var/lib/apt/lists/*
50
+
51
+ # Configure environment for headless Chrome
52
  ENV DISPLAY=:99
53
  ENV PYTHONUNBUFFERED=1
54
+ ENV CHROME_BIN=/usr/bin/google-chrome
55
 
56
  # Copy requirements first for better caching
57
  COPY requirements.txt .
 
66
  # Make supervisor executable
67
  RUN chmod +x supervisor.py
68
 
69
+ # Health check
70
  HEALTHCHECK --interval=60s --timeout=30s --start-period=120s --retries=3 \
71
  CMD ps aux | grep -v grep | grep "supervisor.py" || exit 1
72