Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -1
Dockerfile
CHANGED
|
@@ -4,6 +4,15 @@ FROM python:3.10-slim
|
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /code
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the requirements file *first* to leverage Docker cache
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
|
@@ -17,5 +26,4 @@ COPY . .
|
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
# Command to run your FastAPI app with uvicorn
|
| 20 |
-
# This is the command that starts your server
|
| 21 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
+
# --- ADD THIS SECTION ---
|
| 8 |
+
# Install system dependencies for OpenCV & Paddle
|
| 9 |
+
# This command updates the package list and installs libgl1,
|
| 10 |
+
# which provides the missing libGL.so.1 file.
|
| 11 |
+
RUN apt-get update && apt-get install -y \
|
| 12 |
+
libgl1 \
|
| 13 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
+
# --- END OF NEW SECTION ---
|
| 15 |
+
|
| 16 |
# Copy the requirements file *first* to leverage Docker cache
|
| 17 |
COPY requirements.txt .
|
| 18 |
|
|
|
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
# Command to run your FastAPI app with uvicorn
|
|
|
|
| 29 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|