Spaces:
Runtime error
Runtime error
Remove unnecessary Dockerfile and clean up project structure
Browse files- Dockerfile +5 -0
- dockerfile +2 -2
- requirements.txt +6 -1
Dockerfile
CHANGED
|
@@ -10,6 +10,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
build-essential \
|
| 11 |
gcc \
|
| 12 |
ca-certificates \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Install Python deps (cache layer)
|
|
|
|
| 10 |
build-essential \
|
| 11 |
gcc \
|
| 12 |
ca-certificates \
|
| 13 |
+
libgl1-mesa-glx \
|
| 14 |
+
libglib2.0-0 \
|
| 15 |
+
libsm6 \
|
| 16 |
+
libxext6 \
|
| 17 |
+
libxrender1 \
|
| 18 |
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
|
| 20 |
# Install Python deps (cache layer)
|
dockerfile
CHANGED
|
@@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
build-essential \
|
| 11 |
gcc \
|
| 12 |
ca-certificates \
|
|
|
|
| 13 |
libglib2.0-0 \
|
| 14 |
libsm6 \
|
| 15 |
libxext6 \
|
|
@@ -30,6 +31,5 @@ COPY --chown=appuser:appuser . .
|
|
| 30 |
# Hugging Face Spaces expects the web process to listen on the provided PORT (defaults to 7860)
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
CMD ["sh", "-c", "gunicorn -w 1 -k gthread --threads 4 -b 0.0.0.0:${PORT:-7860} app:app"]
|
| 35 |
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers"]
|
|
|
|
| 10 |
build-essential \
|
| 11 |
gcc \
|
| 12 |
ca-certificates \
|
| 13 |
+
libgl1-mesa-glx \
|
| 14 |
libglib2.0-0 \
|
| 15 |
libsm6 \
|
| 16 |
libxext6 \
|
|
|
|
| 31 |
# Hugging Face Spaces expects the web process to listen on the provided PORT (defaults to 7860)
|
| 32 |
EXPOSE 7860
|
| 33 |
|
| 34 |
+
# Use PORT env if set by Spaces, default to 7860; include proxy headers for correct client IPs
|
|
|
|
| 35 |
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers"]
|
requirements.txt
CHANGED
|
@@ -2,5 +2,10 @@ flask
|
|
| 2 |
numpy
|
| 3 |
matplotlib
|
| 4 |
mediapipe
|
|
|
|
| 5 |
opencv-python-headless
|
| 6 |
-
gunicorn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
numpy
|
| 3 |
matplotlib
|
| 4 |
mediapipe
|
| 5 |
+
<<<<<<< HEAD
|
| 6 |
opencv-python-headless
|
| 7 |
+
gunicorn
|
| 8 |
+
=======
|
| 9 |
+
opencv-python
|
| 10 |
+
uvicorn
|
| 11 |
+
>>>>>>> 71934b09daf489f7ef95af4544f7cb41f734be91
|