Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -5,6 +5,7 @@ FROM python:3.9-slim
|
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
# Install system dependencies required for OpenCV
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
libgl1 \
|
| 10 |
libglib2.0-0 \
|
|
@@ -33,5 +34,5 @@ COPY --chown=user . .
|
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
# Command to run the application using Gunicorn
|
| 36 |
-
#
|
| 37 |
-
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
# Install system dependencies required for OpenCV
|
| 8 |
+
# Note: Using libgl1 instead of libgl1-mesa-glx for newer Debian versions
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
libgl1 \
|
| 11 |
libglib2.0-0 \
|
|
|
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
# Command to run the application using Gunicorn
|
| 37 |
+
# FIXED: We use "python -m gunicorn" to ensure it finds the executable in the path
|
| 38 |
+
CMD ["python", "-m", "gunicorn", "-b", "0.0.0.0:7860", "app:app", "--timeout", "120"]
|