Spaces:
Runtime error
Runtime error
correction dockerfile
Browse files- Dockerfile +13 -7
- 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 |
-
#
|
| 24 |
-
COPY
|
| 25 |
|
| 26 |
-
# ⚡ Étape 5 :
|
| 27 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
|
| 28 |
-
&& pip install --no-cache-dir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
# 📁 Étape
|
| 31 |
COPY . .
|
| 32 |
|
| 33 |
-
# 🌐 Étape
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
-
# 🚀 Étape
|
| 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
|