Quellcode durchsuchen

update Dockerfile, dockerignore

kevin vor 2 Jahren
Ursprung
Commit
4406a2e0ba
2 geänderte Dateien mit 15 neuen und 18 gelöschten Zeilen
  1. 12 0
      .dockerignore
  2. 3 18
      Dockerfile

+ 12 - 0
.dockerignore

@@ -0,0 +1,12 @@
+venv
+.*
+Dockerfile
+configure.sh
+face_align.py
+hello_flask.py
+main.py
+README.md
+take_picture.py
+take_picture_snn.py
+verify_face.py
+verify_face_2.py

+ 3 - 18
Dockerfile

@@ -1,4 +1,4 @@
-FROM python:3.11.3
+FROM python:3.11.3-slim
 
 RUN apt-get -y update
 RUN apt-get install --no-install-recommends -y --fix-missing \
@@ -26,28 +26,13 @@ RUN apt-get install --no-install-recommends -y --fix-missing \
 
 WORKDIR /usr/src/app
 
-COPY requirements.txt .
+COPY . .
 
 RUN pip install --no-cache-dir -r requirements.txt
 
-COPY fr_flask*.py ./
-COPY wsgi*.py ./
-COPY face_recognition_svm.py ./
-COPY application_data ./
-COPY data ./
-COPY application_data/verification_images ./application_data/
-COPY application_data/input_image ./application_data/
-COPY data/train ./data/
-COPY *.sh ./
-
-WORKDIR /usr/src/app
-
-RUN ls -la
-RUN ls -R application_data
-RUN ls -R data
 RUN chmod +x *.sh
 RUN python face_recognition_svm.py
 
 EXPOSE 8349
 
-CMD ["/usr/src/app/run.sh", "--no-venv"]
+CMD ["/usr/src/app/run.sh", "--no-venv"]