Neon-AI commited on
Commit
7d67790
·
verified ·
1 Parent(s): d97ea5d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -61
Dockerfile CHANGED
@@ -1,68 +1,22 @@
1
- FROM node:20-slim
2
 
3
- # Install system dependencies for Chrome
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
- libcairo2 \
13
- libcups2 \
14
- libdbus-1-3 \
15
- libexpat1 \
16
- libfontconfig1 \
17
- libgbm1 \
18
- libglib2.0-0 \
19
- libgtk-3-0 \
20
- libnspr4 \
21
- libnss3 \
22
- libpango-1.0-0 \
23
- libpangocairo-1.0-0 \
24
- libx11-6 \
25
- libx11-xcb1 \
26
- libxcb1 \
27
- libxcomposite1 \
28
- libxcursor1 \
29
- libxdamage1 \
30
- libxext6 \
31
- libxfixes3 \
32
- libxi6 \
33
- libxrandr2 \
34
- libxrender1 \
35
- libxss1 \
36
- libxtst6 \
37
- xdg-utils \
38
- && rm -rf /var/lib/apt/lists/*
39
-
40
- # Install Google Chrome
41
- RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub \
42
- | gpg --dearmor -o /usr/share/keyrings/google-linux.gpg
43
-
44
- RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-linux.gpg] http://dl.google.com/linux/chrome/deb/ stable main" \
45
- > /etc/apt/sources.list.d/google.list
46
-
47
- RUN apt-get update && apt-get install -y --no-install-recommends \
48
- google-chrome-stable \
49
- && rm -rf /var/lib/apt/lists/*
50
-
51
- # App directory
52
  WORKDIR /app
53
 
54
- # Copy package files
55
- COPY package*.json ./
 
 
 
 
 
56
 
57
- # Install node dependencies
58
- RUN npm install
 
 
59
 
60
- # Copy source code
61
- COPY . .
62
 
63
- # Prevent puppeteer from downloading Chromium
64
- ENV PUPPETEER_SKIP_DOWNLOAD=true
65
- ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
66
 
67
- # Run app
68
- CMD ["node", "index.js"]
 
1
+ FROM python:3.11-slim
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y \
6
+ wget curl gnupg \
7
+ libnss3 libatk1.0-0 libatk-bridge2.0-0 \
8
+ libcups2 libdrm2 libxkbcommon0 libxcomposite1 \
9
+ libxdamage1 libxfixes3 libxrandr2 libgbm1 \
10
+ libasound2 libpango-1.0-0 libcairo2 \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+ RUN playwright install chromium
16
+ RUN playwright install-deps chromium
17
 
18
+ COPY app.py .
 
19
 
20
+ EXPOSE 7860
 
 
21
 
22
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]