tayyabimam commited on
Commit
6c8b447
·
verified ·
1 Parent(s): 72c6bb5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Only install minimal 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,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 only essential Python packages
14
- RUN pip install --no-cache-dir fastapi==0.95.0 uvicorn==0.21.1 python-multipart==0.0.6 \
15
- opencv-python-headless==4.7.0.72 matplotlib==3.7.1 huggingface_hub==0.14.1
 
 
 
 
 
 
 
 
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"]