Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 7 |
libgl1 \
|
| 8 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
@@ -10,15 +10,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
# Create required directories
|
| 11 |
RUN mkdir -p uploaded_images static models uploaded_videos
|
| 12 |
|
| 13 |
-
# Install
|
| 14 |
-
RUN pip install --no-cache-dir
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Copy your app.py
|
| 18 |
COPY app.py .
|
| 19 |
|
| 20 |
-
# (Optional) Comment out all face_recognition and dlib usage in app.py for now!
|
| 21 |
-
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# System dependencies
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 7 |
libgl1 \
|
| 8 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
| 10 |
# Create required directories
|
| 11 |
RUN mkdir -p uploaded_images static models uploaded_videos
|
| 12 |
|
| 13 |
+
# 1. Install NumPy < 2 FIRST!
|
| 14 |
+
RUN pip install --no-cache-dir "numpy<2"
|
| 15 |
+
|
| 16 |
+
# 2. Now install the rest (these will use NumPy 1.x)
|
| 17 |
+
RUN pip install --no-cache-dir \
|
| 18 |
+
fastapi==0.95.0 \
|
| 19 |
+
uvicorn==0.21.1 \
|
| 20 |
+
python-multipart==0.0.6 \
|
| 21 |
+
opencv-python-headless==4.7.0.72 \
|
| 22 |
+
matplotlib==3.7.1 \
|
| 23 |
+
huggingface_hub==0.14.1
|
| 24 |
|
| 25 |
# Copy your app.py
|
| 26 |
COPY app.py .
|
| 27 |
|
|
|
|
|
|
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|