Spaces:
Runtime error
Runtime error
AnnSankavi commited on
Commit ·
95cd467
1
Parent(s): 2c2d72d
Fix face_recognition dependency
Browse files- Dockerfile +13 -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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
&& rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
-
RUN pip install --upgrade pip
|
|
|
|
| 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
|
| 2 |
-
uvicorn
|
| 3 |
-
|
| 4 |
-
face_recognition_models
|
| 5 |
-
numpy
|
| 6 |
-
python-multipart
|
| 7 |
-
|
| 8 |
-
python-dotenv
|
| 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
|
|
|