-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 786 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 786 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
# Face-Recon Backend – Docker image
#
# Build: docker build -t face-recon-backend .
# Run: docker run -p 5000:5000 face-recon-backend
FROM python:3.11-slim
# System libraries required by OpenCV and dlib
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies first (layer cache)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source
COPY src/ ./src/
COPY backend/ ./backend/
COPY docker-entrypoint.sh ./
# Create runtime directories
RUN mkdir -p data/known_faces data/unknown_faces logs \
&& chmod +x docker-entrypoint.sh
# Expose Flask port
EXPOSE 5000
ENTRYPOINT ["./docker-entrypoint.sh"]