Spaces:
Sleeping
Sleeping
Commit ·
ebbbeb5
1
Parent(s): 3298ca9
Fix: Add system dependencies for OpenCV
Browse files- Dockerfile +9 -1
Dockerfile
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
# Use a standard Python 3.10 image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /code
|
| 6 |
|
|
@@ -14,5 +21,6 @@ COPY . .
|
|
| 14 |
# Expose the port your app will run on
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
-
# The command to run your app
|
|
|
|
| 18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
# Use a standard Python 3.10 image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# --- ADD THIS BLOCK ---
|
| 5 |
+
# Install system dependencies for OpenCV (which doctr needs)
|
| 6 |
+
RUN apt-get update && apt-get install -y libgl1-mesa-glx && \
|
| 7 |
+
apt-get clean && \
|
| 8 |
+
rm -rf /var/lib/apt/lists/*
|
| 9 |
+
# --- END OF BLOCK ---
|
| 10 |
+
|
| 11 |
# Set the working directory inside the container
|
| 12 |
WORKDIR /code
|
| 13 |
|
|
|
|
| 21 |
# Expose the port your app will run on
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# The command to run your app
|
| 25 |
+
# This is the same command you used locally!
|
| 26 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|