MB-IDK commited on
Commit
8cb592a
·
verified ·
1 Parent(s): 3392909

Create Dockerfile

Browse files
Files changed (1) hide show
  1. 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"]