Samizie commited on
Commit
1e420ee
·
verified ·
1 Parent(s): 12c0791

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies for Playwright
12
+ RUN apt-get update && apt-get install -y \
13
+ curl \
14
+ wget \
15
+ unzip \
16
+ libnss3 \
17
+ libxss1 \
18
+ libasound2 \
19
+ fonts-liberation \
20
+ libgbm-dev \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ # Install Python dependencies
24
+ COPY requirements.txt /app/
25
+ RUN pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Install Playwright and browser dependencies
28
+ RUN pip install playwright
29
+ RUN playwright install --with-deps chromium
30
+
31
+ # Copy the project files
32
+ COPY . /app/
33
+
34
+ # Expose the default Streamlit port
35
+ EXPOSE 7860
36
+
37
+ # Command to run the Streamlit app
38
+ CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]