kebson commited on
Commit
8c6b76a
·
verified ·
1 Parent(s): 77cf05e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -7
Dockerfile CHANGED
@@ -1,23 +1,30 @@
1
- FROM python:3.10
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
- ENV OMP_NUM_THREADS=1
5
 
 
6
  RUN apt-get update && apt-get install -y \
 
 
 
7
  libgl1 \
8
  libglib2.0-0 \
9
- libsm6 \
10
- libxext6 \
11
- libxrender1 \
12
- tesseract-ocr \
13
- tesseract-ocr-fra \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
16
  WORKDIR /app
17
 
 
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
  COPY app.py .
22
 
 
 
 
 
 
23
  CMD ["python", "app.py"]
 
1
+ FROM python:3.10-slim
2
 
3
+ # Éviter les prompts interactifs
4
  ENV DEBIAN_FRONTEND=noninteractive
 
5
 
6
+ # 1️⃣ Dépendances système
7
  RUN apt-get update && apt-get install -y \
8
+ tesseract-ocr \
9
+ libtesseract-dev \
10
+ libleptonica-dev \
11
  libgl1 \
12
  libglib2.0-0 \
13
+ && apt-get clean \
 
 
 
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # 2️⃣ Définir le dossier de travail
17
  WORKDIR /app
18
 
19
+ # 3️⃣ Copier les fichiers
20
  COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
  COPY app.py .
24
 
25
+ # 4️⃣ Variables HF
26
+ ENV GRADIO_SERVER_NAME=0.0.0.0
27
+ ENV GRADIO_SERVER_PORT=7860
28
+
29
+ # 5️⃣ Lancer l'app
30
  CMD ["python", "app.py"]