Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -8
Dockerfile
CHANGED
|
@@ -2,17 +2,20 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp310-cp310-linux_x86_64.whl
|
| 11 |
|
| 12 |
-
#
|
|
|
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
#
|
|
|
|
|
|
|
|
|
|
| 16 |
COPY app.py .
|
| 17 |
|
| 18 |
# Expose ports
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install build dependencies temporarily
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
cmake \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 10 |
|
| 11 |
+
# Copy and install Python dependencies
|
| 12 |
+
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Build and install llama-cpp-python from source (CPU-only)
|
| 16 |
+
RUN pip install --no-cache-dir llama-cpp-python
|
| 17 |
+
|
| 18 |
+
# Copy application file
|
| 19 |
COPY app.py .
|
| 20 |
|
| 21 |
# Expose ports
|