aniket9909 commited on
Commit
8eb9c8f
·
verified ·
1 Parent(s): 4fba547

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.10
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies required by Chromium and Playwright
8
+ RUN apt-get update && apt-get install -y \
9
+ wget \
10
+ libnss3 \
11
+ libatk1.0-0 \
12
+ libatk-bridge2.0-0 \
13
+ libcups2 \
14
+ libdbus-1-3 \
15
+ libxkbcommon0 \
16
+ libxcomposite1 \
17
+ libxrandr2 \
18
+ libxdamage1 \
19
+ libxfixes3 \
20
+ libpango-1.0-0 \
21
+ libpangocairo-1.0-0 \
22
+ libasound2 \
23
+ libxshmfence1 \
24
+ libgbm1 \
25
+ libgtk-3-0 \
26
+ && apt-get clean
27
+
28
+ # Copy requirements
29
+ COPY requirements.txt /app/requirements.txt
30
+
31
+ # Install Python dependencies
32
+ RUN pip install --no-cache-dir -r /app/requirements.txt
33
+
34
+ # Install Playwright browsers (Chromium)
35
+ RUN playwright install --with-deps chromium
36
+
37
+ # Copy your entire app into the container
38
+ COPY . /app
39
+
40
+ # Expose port if you add a UI (e.g., Gradio)
41
+ EXPOSE 7860
42
+
43
+ CMD ["python", "app.py"]
44
+
45
+
46
+