correct docker file and improve requirements.txt file to use the workable tensorflow version

This commit is contained in:
seavphing 2024-10-17 10:24:56 +07:00
parent 95ebe372df
commit 9c5981f8a6
3 changed files with 17 additions and 5 deletions

View File

@ -7,14 +7,21 @@ LABEL org.opencontainers.image.source https://github.com/serengil/deepface
RUN mkdir /app
RUN mkdir /app/deepface
# -----------------------------------
# switch to application directory
WORKDIR /app
# -----------------------------------
# update image os
RUN apt-get update
RUN apt-get install ffmpeg libsm6 libxext6 -y
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libhdf5-dev \
&& rm -rf /var/lib/apt/lists/*
# -----------------------------------
# Copy required files from repo into image
@ -25,6 +32,7 @@ COPY ./requirements_local /app/requirements_local.txt
COPY ./package_info.json /app/
COPY ./setup.py /app/
COPY ./README.md /app/
COPY ./entrypoint.sh /app/deepface/api/src/entrypoint.sh
# -----------------------------------
# if you plan to use a GPU, you should install the 'tensorflow-gpu' package

View File

@ -1 +1,5 @@
gunicorn -w 1 -b 0.0.0.0:5000 --timeout 7200 --log-level 'debug' --access-logfile - --access-logformat '%(h)s - - [%(t)s] "%(r)s" %(s)s %(b)s %(L)s' app:create_app()
# Example content
echo "Starting the application..."
exec "$@"
gunicorn -w 1 -b 0.0.0.0:5000 --timeout 7200 --log-level 'debug' --access-logfile - --access-logformat '%(h)s - - [%(t)s] "%(r)s" %(s)s %(b)s %(L)s' app:create_app

View File

@ -2,5 +2,5 @@ numpy==1.22.3
pandas==2.0.3
Pillow==9.0.0
opencv-python==4.9.0.80
tensorflow==2.9.0
keras==2.9.0
tensorflow==2.13.1
keras==2.13.1