Neo2902 commited on
Commit
0adccff
·
1 Parent(s): 66b898d

Projet complet avec chunking, extract_playlist et youtube_search

Browse files
Files changed (1) hide show
  1. Dockerfile +43 -0
Dockerfile CHANGED
@@ -1,3 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # you will also find guides on how best to write your Dockerfile
3
 
 
1
+ # Lire la doc officielle : https://huggingface.co/docs/hub/spaces-sdks-docker
2
+
3
+ FROM python:3.9
4
+
5
+ # Installer les dépendances système nécessaires à Playwright avant de passer en user non root
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ libnss3 \
8
+ libdbus-1-3 \
9
+ libatk1.0-0 \
10
+ libatk-bridge2.0-0 \
11
+ libcups2 \
12
+ libxkbcommon0 \
13
+ libatspi2.0-0 \
14
+ libxcomposite1 \
15
+ libxdamage1 \
16
+ libxfixes3 \
17
+ libxrandr2 \
18
+ libgbm1 \
19
+ libasound2 \
20
+ curl \
21
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
22
+
23
+ # Ajout d'un utilisateur non-root
24
+ RUN useradd -m -u 1000 user
25
+ USER user
26
+ ENV PATH="/home/user/.local/bin:$PATH"
27
+
28
+ WORKDIR /app
29
+
30
+ # Copier requirements et installer les dépendances python
31
+ COPY --chown=user ./requirements.txt requirements.txt
32
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
33
+
34
+ # Installer les navigateurs Playwright avec dépendances user-level
35
+ RUN playwright install --with-deps
36
+
37
+ # Copier le reste de l'application
38
+ COPY --chown=user . /app
39
+
40
+ EXPOSE 7860
41
+
42
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
43
+
44
  # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
45
  # you will also find guides on how best to write your Dockerfile
46