Update Dockerfile
Browse files- Dockerfile +6 -20
Dockerfile
CHANGED
|
@@ -1,36 +1,22 @@
|
|
| 1 |
-
# Start with a standard Python 3.9 slim image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
# Install system
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
wget \
|
| 7 |
-
|
| 8 |
-
libnspr4 \
|
| 9 |
-
libatk1.0-0 \
|
| 10 |
-
libatk-bridge2.0-0 \
|
| 11 |
-
libcups2 \
|
| 12 |
-
libdrm2 \
|
| 13 |
-
libxkbcommon0 \
|
| 14 |
-
libxcomposite1 \
|
| 15 |
-
libxdamage1 \
|
| 16 |
-
libxext6 \
|
| 17 |
-
libxfixes3 \
|
| 18 |
-
librandr2 \
|
| 19 |
-
libgbm1 \
|
| 20 |
-
libasound2 \
|
| 21 |
-
libpangocairo-1.0-0 \
|
| 22 |
-
libpango-1.0-0 \
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
WORKDIR /app
|
| 26 |
|
| 27 |
-
# Install Python
|
| 28 |
RUN pip install --no-cache-dir fastapi uvicorn playwright-stealth
|
|
|
|
|
|
|
| 29 |
RUN playwright install --with-deps chromium
|
| 30 |
|
| 31 |
COPY . .
|
| 32 |
|
| 33 |
-
# Hugging Face
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
| 3 |
+
# Install basic system tools
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
wget \
|
| 6 |
+
gnupg \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# Install Python requirements
|
| 12 |
RUN pip install --no-cache-dir fastapi uvicorn playwright-stealth
|
| 13 |
+
|
| 14 |
+
# This command installs all necessary browser dependencies automatically
|
| 15 |
RUN playwright install --with-deps chromium
|
| 16 |
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
+
# Hugging Face port
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|