Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +20 -13
Dockerfile
CHANGED
|
@@ -1,19 +1,26 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
"llama-cpp-python[server]==0.2.30" \
|
| 10 |
-
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
RUN
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use Python base image (with CUDA if GPU needed)
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
| 4 |
+
# Install system dependencies
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential \
|
| 7 |
+
cmake \
|
| 8 |
+
wget \
|
| 9 |
+
git \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Set working directory
|
| 13 |
+
WORKDIR /app
|
| 14 |
|
| 15 |
+
# Copy your model and code into the container
|
| 16 |
+
COPY . /app
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 20 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
+
# Expose port for HF Space
|
| 23 |
+
EXPOSE 7860
|
| 24 |
|
| 25 |
+
# Command to run your app
|
| 26 |
+
CMD ["python", "app.py"]
|