Market / Dockerfile
nick5363's picture
Create Dockerfile
f9da19b verified
raw
history blame contribute delete
799 Bytes
# Sử dụng image cơ bản của Python
FROM python:3.9-slim
# Cài đặt các phụ thuộc hệ thống cần thiết cho Playwright
RUN apt-get update && apt-get install -y \
libnss3 \
libxss1 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libatspi2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Cài đặt Python dependencies
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Cài đặt trình duyệt cho Playwright
RUN playwright install
# Sao chép mã nguồn
COPY . .
# Chạy ứng dụng Streamlit
CMD ["streamlit", "run", "app.py", "--server.port", "7860"]