Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -0
Dockerfile
CHANGED
|
@@ -2,6 +2,19 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN pip install --no-cache-dir fastapi uvicorn huggingface_hub pydantic
|
| 6 |
|
| 7 |
COPY app.py .
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# 1. Install system tools (Keep this, it prevents other errors)
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
curl \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# 2. Install the missing library (CRITICAL STEP)
|
| 12 |
+
# We use the pre-built CPU version to avoid the "Wheel Build" errors
|
| 13 |
+
RUN pip install --no-cache-dir \
|
| 14 |
+
llama-cpp-python \
|
| 15 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 16 |
+
|
| 17 |
+
# 3. Install the rest of your web tools
|
| 18 |
RUN pip install --no-cache-dir fastapi uvicorn huggingface_hub pydantic
|
| 19 |
|
| 20 |
COPY app.py .
|