nick5363 commited on
Commit
9767f42
·
verified ·
1 Parent(s): 2cdf938

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -17
Dockerfile CHANGED
@@ -1,24 +1,39 @@
1
-
2
- # Base image
3
  FROM python:3.10-slim
4
 
5
- # System dependencies
6
  RUN apt-get update && apt-get install -y \
7
- wget curl gnupg unzip fonts-liberation libnss3 libatk1.0-0 \
8
- libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 \
9
- libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 \
10
- libgtk-3-0 libx11-xcb1 xvfb && \
11
- apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- # Install Python dependencies
14
- RUN pip install --no-cache-dir streamlit pandas playwright beautifulsoup4
 
15
 
16
- # Install browser for Playwright
17
- RUN playwright install --with-deps chromium
 
18
 
19
- # Copy application code
20
- COPY . /app
21
- WORKDIR /app
22
 
23
- # Run the app
24
- CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Cài đặt các dependency cơ bản
4
  RUN apt-get update && apt-get install -y \
5
+ curl \
6
+ wget \
7
+ unzip \
8
+ gnupg \
9
+ libnss3 \
10
+ libatk-bridge2.0-0 \
11
+ libx11-xcb1 \
12
+ libxcomposite1 \
13
+ libxcursor1 \
14
+ libxdamage1 \
15
+ libxi6 \
16
+ libxtst6 \
17
+ libxrandr2 \
18
+ libasound2 \
19
+ libpangocairo-1.0-0 \
20
+ libgtk-3-0 \
21
+ libgbm1 \
22
+ && rm -rf /var/lib/apt/lists/*
23
+
24
+ # Tạo thư mục app
25
+ WORKDIR /app
26
 
27
+ # Sao chép file
28
+ COPY requirements.txt requirements.txt
29
+ COPY app.py app.py
30
 
31
+ # Cài đặt Python package
32
+ RUN pip install --upgrade pip
33
+ RUN pip install -r requirements.txt
34
 
35
+ # Cài đặt browser cho playwright
36
+ RUN playwright install chromium
 
37
 
38
+ # Chạy Streamlit
39
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]