rkonan commited on
Commit
8a9ecbe
·
1 Parent(s): 22e7a08

correction dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -7
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -20,18 +20,24 @@ ENV HOME="/code"
20
  # 📁 Étape 3 : répertoire de travail
21
  WORKDIR /code
22
 
23
- # 🔄 Étape 4 : copier les requirements
24
- COPY requirements.txt .
25
 
26
- # ⚡ Étape 5 : mise à jour pip + installation rapide
27
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
28
- && pip install --no-cache-dir --prefer-binary -r requirements.txt
 
 
 
 
 
 
29
 
30
- # 📁 Étape 6 : copier tout le code de l'app
31
  COPY . .
32
 
33
- # 🌐 Étape 7 : exposer le port Streamlit
34
  EXPOSE 7860
35
 
36
- # 🚀 Étape 8 : lancer l'application
37
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
20
  # 📁 Étape 3 : répertoire de travail
21
  WORKDIR /code
22
 
23
+ # 📥 Étape 4 : copier la wheel précompilée AVANT requirements
24
+ COPY wheels/ ./wheels/
25
 
26
+ # ⚡ Étape 5 : install pip + llama-cpp-python via wheel locale
27
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
28
+ && pip install --no-cache-dir ./wheels/llama_cpp_python-0.3.14-*.whl
29
+
30
+ # 📄 Étape 6 : copier le requirements sans llama-cpp-python
31
+ COPY requirements.txt .
32
+
33
+ # 📦 Étape 7 : installer le reste
34
+ RUN pip install --no-cache-dir --prefer-binary -r requirements.txt
35
 
36
+ # 📁 Étape 8 : copier le reste du code de l'app
37
  COPY . .
38
 
39
+ # 🌐 Étape 9 : exposer le port Streamlit
40
  EXPOSE 7860
41
 
42
+ # 🚀 Étape 10 : lancer l'application
43
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- llama-cpp-python==0.3.14
2
  sentence-transformers==5.0.0
3
  transformers==4.54.1
4
  llama-index==0.13.0
 
1
+ #llama-cpp-python==0.3.14
2
  sentence-transformers==5.0.0
3
  transformers==4.54.1
4
  llama-index==0.13.0