Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Deps système pour Chromium
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
wget gnupg ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 \
|
| 6 |
+
libatk1.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 libgtk-3-0 libnspr4 \
|
| 7 |
+
libnss3 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 xdg-utils \
|
| 8 |
+
libxshmfence1 libglu1-mesa libpango-1.0-0 libcairo2 \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
WORKDIR /app
|
| 12 |
+
COPY requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
RUN playwright install chromium
|
| 15 |
+
|
| 16 |
+
COPY app.py .
|
| 17 |
+
|
| 18 |
+
# HF Spaces attend le port 7860
|
| 19 |
+
EXPOSE 7860
|
| 20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|