Sinketji commited on
Commit
ec35004
·
verified ·
1 Parent(s): 12c6d9d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies required by Playwright
7
+ RUN apt-get update && apt-get install -y \
8
+ wget \
9
+ gnupg \
10
+ curl \
11
+ unzip \
12
+ libnss3 \
13
+ libatk-bridge2.0-0 \
14
+ libgtk-3-0 \
15
+ libxss1 \
16
+ libasound2 \
17
+ libgbm1 \
18
+ libxshmfence1 \
19
+ libdrm2 \
20
+ fonts-liberation \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ # Copy requirements
24
+ COPY requirements.txt .
25
+
26
+ # Install Python dependencies
27
+ RUN pip install --no-cache-dir -r requirements.txt
28
+
29
+ # Install Playwright browsers
30
+ RUN playwright install chromium
31
+
32
+ # Copy all files
33
+ COPY . .
34
+
35
+ # Expose port
36
+ EXPOSE 7860
37
+
38
+ # Run FastAPI app
39
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]