AnnSankavi commited on
Commit
f268f62
ยท
2 Parent(s): 840c040e4abe2e
Files changed (4) hide show
  1. .dockerignore +9 -0
  2. Dockerfile +27 -0
  3. README.md +24 -0
  4. requirements.txt +11 -0
.dockerignore CHANGED
@@ -1,4 +1,13 @@
 
1
  venv
2
  __pycache__
3
  .env
4
  *.pyc
 
 
 
 
 
 
 
 
 
1
+ <<<<<<< HEAD
2
  venv
3
  __pycache__
4
  .env
5
  *.pyc
6
+ =======
7
+ .env
8
+ venv
9
+ __pycache__
10
+ cmake_check.txt
11
+ install_log.txt
12
+ *.bat
13
+ >>>>>>> b17c4a8b3ba848593384d3c1370bb9feffbdb037
Dockerfile CHANGED
@@ -1,5 +1,6 @@
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/*
@@ -10,4 +11,30 @@ COPY . /app
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
+ <<<<<<< HEAD
4
  RUN apt-get update && apt-get install -y \
5
  build-essential cmake \
6
  && rm -rf /var/lib/apt/lists/*
 
11
  RUN pip install --upgrade pip && pip install -r requirements.txt
12
 
13
  ENV PORT=7860
14
+ =======
15
+ # Install system dependencies for dlib / face_recognition
16
+ RUN apt-get update && apt-get install -y \
17
+ build-essential \
18
+ cmake \
19
+ libgl1 \
20
+ libglib2.0-0 \
21
+ libsm6 \
22
+ libxext6 \
23
+ libxrender-dev \
24
+ libopenblas-dev \
25
+ liblapack-dev \
26
+ && rm -rf /var/lib/apt/lists/*
27
+
28
+ WORKDIR /app
29
+ COPY requirements.txt /app/requirements.txt
30
+
31
+ RUN pip install --upgrade pip setuptools wheel \
32
+ && pip install --no-cache-dir -r requirements.txt \
33
+ && python -c "import face_recognition; print('face_recognition ok')"
34
+
35
+ COPY . /app
36
+
37
+ ENV PORT=7860
38
+
39
+ >>>>>>> b17c4a8b3ba848593384d3c1370bb9feffbdb037
40
  CMD ["python", "main.py"]
README.md CHANGED
@@ -1,3 +1,4 @@
 
1
  # Face Verification API
2
 
3
  A self-hosted Python backend for face enrollment and authentication, replacing FaceIO.
@@ -120,3 +121,26 @@ Response:
120
  ```bash
121
  curl http://localhost:8000/health
122
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <<<<<<< HEAD
2
  # Face Verification API
3
 
4
  A self-hosted Python backend for face enrollment and authentication, replacing FaceIO.
 
121
  ```bash
122
  curl http://localhost:8000/health
123
  ```
124
+ =======
125
+ ---
126
+ title: Face API
127
+ emoji: ๐Ÿ˜Ž
128
+ colorFrom: blue
129
+ colorTo: purple
130
+ sdk: docker
131
+ pinned: false
132
+ ---
133
+
134
+ # Face Recognition API
135
+
136
+ This is a FastAPI-based Face Recognition service deployed on Hugging Face Spaces using Docker.
137
+
138
+ ## Endpoints
139
+
140
+ - `/health` โ†’ API health check
141
+ - `/verify-face` โ†’ Face verification endpoint
142
+
143
+ ## Usage
144
+
145
+ This API is used by the Attendance App to verify users via face recognition.
146
+ >>>>>>> b17c4a8b3ba848593384d3c1370bb9feffbdb037
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
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)
@@ -7,3 +8,13 @@ python-multipart>=0.0.6
7
  httpx>=0.26.0
8
  python-dotenv>=1.0.0
9
  pillow>=10.0.0
 
 
 
 
 
 
 
 
 
 
 
1
+ <<<<<<< HEAD
2
  fastapi>=0.109.0
3
  uvicorn>=0.27.0
4
  # face_recognition>=1.3.0 (Installed manually with --no-deps to use dlib-bin)
 
8
  httpx>=0.26.0
9
  python-dotenv>=1.0.0
10
  pillow>=10.0.0
11
+ =======
12
+ fastapi
13
+ uvicorn
14
+ face_recognition
15
+ face_recognition_models
16
+ numpy
17
+ python-multipart
18
+ pillow
19
+ python-dotenv
20
+ >>>>>>> b17c4a8b3ba848593384d3c1370bb9feffbdb037