Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10
|
| 2 |
+
|
| 3 |
+
# Install system dependencies for Playwright
|
| 4 |
+
RUN apt-get update \
|
| 5 |
+
&& apt-get install -y --no-install-recommends \
|
| 6 |
+
wget gnupg ca-certificates \
|
| 7 |
+
libatk1.0-0 libatk-bridge2.0-0 libcups2 libdbus-1-3 \
|
| 8 |
+
libxkbcommon0 libxdamage1 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 \
|
| 9 |
+
libnss3 libx11-xcb1 libxcomposite1 libxcursor1 libxfixes3 libxrender1 \
|
| 10 |
+
libxi6 libxtst6 libglib2.0-0 libgtk-3-0 \
|
| 11 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
# Install Playwright + browsers
|
| 14 |
+
RUN pip install playwright \
|
| 15 |
+
&& playwright install \
|
| 16 |
+
&& playwright install-deps
|
| 17 |
+
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
COPY requirements.txt /app/requirements.txt
|
| 20 |
+
RUN pip install -r /app/requirements.txt
|
| 21 |
+
|
| 22 |
+
# Copy application
|
| 23 |
+
COPY . /app
|
| 24 |
+
WORKDIR /app
|
| 25 |
+
|
| 26 |
+
EXPOSE 7860
|
| 27 |
+
CMD ["python", "app.py"]
|