klydekushy commited on
Commit
acd44d1
·
verified ·
1 Parent(s): 9265340

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -1
Dockerfile CHANGED
@@ -1,11 +1,28 @@
1
  FROM python:3.10-slim
2
- RUN apt-get update && apt-get install -y build-essential tesseract-ocr tesseract-ocr-fra libgl1-mesa-glx libglib2.0-0 && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
 
 
4
  RUN mkdir -p /app/cache && chmod 777 /app/cache
5
  ENV HF_HOME=/app/cache
6
  ENV DOCLING_MODELS_CACHE=/app/cache
7
  ENV RAPIDOCR_PATH=/app/cache
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
 
10
  COPY . .
 
 
 
11
  CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]
 
1
  FROM python:3.10-slim
2
+
3
+ # Mise à jour des paquets et installation des dépendances système
4
+ # libgl1-mesa-glx est remplacé par libgl1
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ tesseract-ocr \
8
+ tesseract-ocr-fra \
9
+ libgl1 \
10
+ libglib2.0-0 \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
  WORKDIR /app
14
+
15
+ # Création du cache avec permissions totales
16
  RUN mkdir -p /app/cache && chmod 777 /app/cache
17
  ENV HF_HOME=/app/cache
18
  ENV DOCLING_MODELS_CACHE=/app/cache
19
  ENV RAPIDOCR_PATH=/app/cache
20
+
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
+
24
  COPY . .
25
+
26
+ EXPOSE 7860
27
+
28
  CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]