-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.backend
More file actions
33 lines (25 loc) · 792 Bytes
/
Copy pathDockerfile.backend
File metadata and controls
33 lines (25 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use Debian Bullseye slim as base for better compatibility
FROM python:3.9-slim-bullseye
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire project
COPY . .
# Expose the port the app runs on
EXPOSE 5000
# Run face encoding during build
RUN mkdir -p /app/data
RUN python -m src.encoders.encode_faces
# Command to run the face recognition service
CMD ["python", "-m", "src.realtime.face_recognition_live"]