Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +8 -12
Dockerfile
CHANGED
|
@@ -1,24 +1,20 @@
|
|
| 1 |
-
# Use a lightweight Python image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
-
python3-dev \
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Install llama-cpp-python
|
| 12 |
-
#
|
| 13 |
-
RUN pip install
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
# Set work directory
|
| 18 |
WORKDIR /app
|
| 19 |
-
|
| 20 |
-
# Copy your app code
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
-
# Start the application
|
| 24 |
CMD ["python", "app.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install minimal system tools
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
build-essential \
|
|
|
|
| 6 |
git \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# Fix: Install pre-built wheel for llama-cpp-python
|
| 10 |
+
# This avoids the "Building wheel" hang/error
|
| 11 |
+
RUN pip install --no-cache-dir \
|
| 12 |
+
gradio \
|
| 13 |
+
huggingface_hub \
|
| 14 |
+
numpy \
|
| 15 |
+
"llama-cpp-python>=0.2.75" --extra-index-url https://github.io
|
| 16 |
|
|
|
|
|
|
|
| 17 |
WORKDIR /app
|
|
|
|
|
|
|
| 18 |
COPY . .
|
| 19 |
|
|
|
|
| 20 |
CMD ["python", "app.py"]
|