From f7f242d99883f717dd02850dfcf39d5006b21db8 Mon Sep 17 00:00:00 2001 From: KhanbalaRashidov Date: Mon, 2 Jan 2023 16:14:30 +0300 Subject: [PATCH 1/2] fix --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f889db18..39b85645e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,9 +28,9 @@ RUN apt-get install -y --fix-missing \ 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. From da8d0eb0a6d2a398b50b7e1d11794020d7be1972 Mon Sep 17 00:00:00 2001 From: KhanbalaRashidov Date: Tue, 3 Jan 2023 10:05:49 +0300 Subject: [PATCH 2/2] edit Dockerfile --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39b85645e..cd1aa0f3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -27,7 +30,6 @@ RUN apt-get install -y --fix-missing \ && apt-get clean && rm -rf /tmp/* /var/tmp/* RUN cd ~ && \ - mkdir -p dlib && \ git clone https://github.com/davisking/dlib.git dlib/ && \ cd dlib/ && \ python3 setup.py install @@ -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