Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #1463

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

FROM python:3.10.3-slim-bullseye

WORKDIR /app

RUN apt-get -y update

RUN apt-get install -y --fix-missing \
build-essential \
cmake \
Expand All @@ -27,10 +30,9 @@ RUN apt-get install -y --fix-missing \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*

RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
git clone https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
python3 setup.py install


# The rest of this file just runs an example script.
Expand All @@ -41,12 +43,13 @@ RUN cd ~ && \
# pip3 install -r requirements.txt
# RUN whatever_command_you_run_to_start_your_app

COPY . /root/face_recognition
RUN cd /root/face_recognition && \
COPY . /app

RUN cd /app && \
pip3 install -r requirements.txt && \
python3 setup.py install

# Add pip3 install opencv-python==4.1.2.30 if you want to run the live webcam examples

CMD cd /root/face_recognition/examples && \
CMD cd /app/examples && \
python3 recognize_faces_in_pictures.py