Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +1 -12
Dockerfile
CHANGED
|
@@ -1,19 +1,9 @@
|
|
| 1 |
-
# Use a Python image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# === FIX: Install C/C++ Build Dependencies ===
|
| 8 |
-
# These are required to compile llama-cpp-python and its C++ core.
|
| 9 |
-
RUN apt-get update && \
|
| 10 |
-
apt-get install -y \
|
| 11 |
-
build-essential \
|
| 12 |
-
cmake \
|
| 13 |
-
curl \
|
| 14 |
-
&& \
|
| 15 |
-
rm -rf /var/lib/apt/lists/*
|
| 16 |
-
|
| 17 |
# Copy the requirements file and install dependencies
|
| 18 |
COPY requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -26,4 +16,3 @@ EXPOSE 7860
|
|
| 26 |
|
| 27 |
# Command to run the application using Gunicorn
|
| 28 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "-w", "2", "app:app"]
|
| 29 |
-
# Reduced workers to 2 to conserve memory on the 16GB tier
|
|
|
|
| 1 |
+
# Use a clean Python image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the requirements file and install dependencies
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 16 |
|
| 17 |
# Command to run the application using Gunicorn
|
| 18 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "-w", "2", "app:app"]
|
|
|