Spaces:
Paused
Paused
correction dockerfile
Browse files- Dockerfile +13 -25
- requirements.txt +3 -9
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
# ⚙️ Étape 1 : base
|
2 |
-
FROM python:3.
|
3 |
|
4 |
-
# 📦 Étape 2 :
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
build-essential \
|
7 |
git \
|
@@ -9,37 +9,25 @@ RUN apt-get update && apt-get install -y \
|
|
9 |
curl \
|
10 |
libopenblas-dev \
|
11 |
libsqlite3-dev \
|
|
|
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# 📁 Étape 3 :
|
15 |
WORKDIR /code
|
16 |
|
17 |
-
#
|
18 |
-
COPY wheels/ ./wheels/
|
19 |
-
|
20 |
-
# ⚡ Étape 5 : installer les wheels manuellement AVANT tout (évite les builds !)
|
21 |
-
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
22 |
-
&& pip install --no-cache-dir --find-links=./wheels \
|
23 |
-
llama-cpp-python==0.3.14 \
|
24 |
-
numpy==1.26.4 \
|
25 |
-
typing-extensions==4.14.1 \
|
26 |
-
diskcache==5.6.3 \
|
27 |
-
jinja2==3.1.6 \
|
28 |
-
MarkupSafe==3.0.2
|
29 |
-
|
30 |
-
# 📄 Étape 6 : copier le requirements.txt (hors wheels)
|
31 |
COPY requirements.txt .
|
32 |
|
33 |
-
#
|
34 |
-
RUN pip install --no-cache-dir --
|
35 |
-
|
36 |
-
-r requirements.txt
|
37 |
|
38 |
-
#
|
39 |
COPY . .
|
40 |
|
41 |
-
# 🌐 Étape
|
42 |
EXPOSE 7860
|
43 |
|
44 |
-
# 🚀 Étape
|
45 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
1 |
+
# ⚙️ Étape 1 : Image de base stable avec GLIBC + wheels compatibles
|
2 |
+
FROM python:3.10-slim
|
3 |
|
4 |
+
# 📦 Étape 2 : dépendances système minimales
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
build-essential \
|
7 |
git \
|
|
|
9 |
curl \
|
10 |
libopenblas-dev \
|
11 |
libsqlite3-dev \
|
12 |
+
libgl1 \
|
13 |
+
libglib2.0-0 \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
+
# 📁 Étape 3 : répertoire de travail
|
17 |
WORKDIR /code
|
18 |
|
19 |
+
# 🔄 Étape 4 : copier les requirements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
COPY requirements.txt .
|
21 |
|
22 |
+
# ⚡ Étape 5 : mise à jour pip + installation rapide
|
23 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
24 |
+
&& pip install --no-cache-dir --prefer-binary -r requirements.txt
|
|
|
25 |
|
26 |
+
# 📁 Étape 6 : copier le code de l'app
|
27 |
COPY . .
|
28 |
|
29 |
+
# 🌐 Étape 7 : exposer le port Streamlit
|
30 |
EXPOSE 7860
|
31 |
|
32 |
+
# 🚀 Étape 8 : lancer l'application
|
33 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
requirements.txt
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
# === Core LLM + RAG ===
|
2 |
llama-cpp-python==0.3.14
|
3 |
sentence-transformers==5.0.0
|
4 |
transformers==4.54.1
|
@@ -7,29 +6,24 @@ llama-index-vector-stores-faiss==0.5.0
|
|
7 |
llama-index-embeddings-huggingface==0.6.0
|
8 |
faiss-cpu==1.11.0.post1
|
9 |
|
10 |
-
# === Docling RAG ===
|
11 |
docling==2.43.0
|
12 |
docling-core==2.44.1
|
13 |
docling-ibm-models==3.9.0
|
14 |
docling-parse==4.1.0
|
15 |
|
16 |
-
# === ML + maths ===
|
17 |
numpy==1.26.4
|
18 |
-
scikit-learn==1.
|
19 |
-
scipy==1.
|
20 |
-
networkx==3.
|
21 |
joblib==1.5.1
|
22 |
|
23 |
-
# === Streamlit app ===
|
24 |
streamlit==1.47.1
|
25 |
streamlit-autorefresh==1.0.1
|
26 |
|
27 |
-
# === NLP + I/O ===
|
28 |
nltk==3.9.1
|
29 |
pandas==2.2.3
|
30 |
python-dotenv==1.1.1
|
31 |
|
32 |
-
# === Divers utiles ===
|
33 |
colorama==0.4.6
|
34 |
typing-extensions==4.14.1
|
35 |
tenacity==9.1.2
|
|
|
|
|
1 |
llama-cpp-python==0.3.14
|
2 |
sentence-transformers==5.0.0
|
3 |
transformers==4.54.1
|
|
|
6 |
llama-index-embeddings-huggingface==0.6.0
|
7 |
faiss-cpu==1.11.0.post1
|
8 |
|
|
|
9 |
docling==2.43.0
|
10 |
docling-core==2.44.1
|
11 |
docling-ibm-models==3.9.0
|
12 |
docling-parse==4.1.0
|
13 |
|
|
|
14 |
numpy==1.26.4
|
15 |
+
scikit-learn==1.3.2
|
16 |
+
scipy==1.11.4
|
17 |
+
networkx==3.2.1
|
18 |
joblib==1.5.1
|
19 |
|
|
|
20 |
streamlit==1.47.1
|
21 |
streamlit-autorefresh==1.0.1
|
22 |
|
|
|
23 |
nltk==3.9.1
|
24 |
pandas==2.2.3
|
25 |
python-dotenv==1.1.1
|
26 |
|
|
|
27 |
colorama==0.4.6
|
28 |
typing-extensions==4.14.1
|
29 |
tenacity==9.1.2
|