AnnSankavi commited on
Commit
95cd467
·
1 Parent(s): 2c2d72d

Fix face_recognition dependency

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -2
  2. requirements.txt +8 -9
Dockerfile CHANGED
@@ -1,13 +1,24 @@
1
  FROM python:3.11-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
- build-essential cmake \
 
 
 
 
 
 
 
 
5
  && rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /app
8
  COPY . /app
9
 
10
- RUN pip install --upgrade pip && pip install -r requirements.txt
 
11
 
12
  ENV PORT=7860
 
13
  CMD ["python", "main.py"]
 
1
  FROM python:3.11-slim
2
 
3
+ # Install system dependencies for dlib / face_recognition
4
  RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ cmake \
7
+ libgl1 \
8
+ libglib2.0-0 \
9
+ libsm6 \
10
+ libxext6 \
11
+ libxrender-dev \
12
+ libopenblas-dev \
13
+ liblapack-dev \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
  WORKDIR /app
17
  COPY . /app
18
 
19
+ RUN pip install --upgrade pip \
20
+ && pip install --no-cache-dir -r requirements.txt
21
 
22
  ENV PORT=7860
23
+
24
  CMD ["python", "main.py"]
requirements.txt CHANGED
@@ -1,9 +1,8 @@
1
- fastapi>=0.109.0
2
- uvicorn>=0.27.0
3
- # face_recognition>=1.3.0 (Installed manually with --no-deps to use dlib-bin)
4
- face_recognition_models>=0.3.0
5
- numpy>=1.24.0
6
- python-multipart>=0.0.6
7
- httpx>=0.26.0
8
- python-dotenv>=1.0.0
9
- pillow>=10.0.0
 
1
+ fastapi
2
+ uvicorn
3
+ face_recognition
4
+ face_recognition_models
5
+ numpy
6
+ python-multipart
7
+ pillow
8
+ python-dotenv