Docfile commited on
Commit
e0c54b0
·
verified ·
1 Parent(s): 9d017fd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,9 +1,11 @@
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
 
4
- FROM python:3.12
5
-
6
- RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
 
 
7
 
8
  RUN useradd -m -u 1000 user
9
  USER user
@@ -15,4 +17,6 @@ COPY --chown=user ./requirements.txt requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
  COPY --chown=user . /app
18
- CMD ["python","app.py"]
 
 
 
1
+ # Utiliser une image basée sur Debian 12 "Bookworm", où wkhtmltopdf est disponible
2
+ FROM python:3.11-bookworm
3
 
4
+ # Mettre à jour et installer wkhtmltopdf et ses dépendances
5
+ RUN apt-get update && apt-get install -y \
6
+ wkhtmltopdf \
7
+ xvfb \
8
+ && rm -rf /var/lib/apt/lists/*
9
 
10
  RUN useradd -m -u 1000 user
11
  USER user
 
17
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
18
 
19
  COPY --chown=user . /app
20
+
21
+ # Commande de démarrage Flask
22
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]