mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45:21 +00:00
style: split instructions into logical units
This commit is contained in:
parent
99f5295638
commit
d750c2b28e
@ -1,10 +1,12 @@
|
|||||||
#base image
|
#base image
|
||||||
FROM python:3.8
|
FROM python:3.8
|
||||||
LABEL org.opencontainers.image.source https://github.com/serengil/deepface
|
LABEL org.opencontainers.image.source https://github.com/serengil/deepface
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# create required folder
|
# create required folder
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
RUN mkdir /app/deepface
|
RUN mkdir /app/deepface
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Copy required files from repo into image
|
# Copy required files from repo into image
|
||||||
COPY ./deepface /app/deepface
|
COPY ./deepface /app/deepface
|
||||||
@ -15,30 +17,37 @@ COPY ./api/service.py /app/
|
|||||||
COPY ./requirements.txt /app/
|
COPY ./requirements.txt /app/
|
||||||
COPY ./setup.py /app/
|
COPY ./setup.py /app/
|
||||||
COPY ./README.md /app/
|
COPY ./README.md /app/
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# switch to application directory
|
# switch to application directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# update image os
|
# update image os
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install ffmpeg libsm6 libxext6 -y
|
RUN apt-get install ffmpeg libsm6 libxext6 -y
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# if you will use gpu, then you should install tensorflow-gpu package
|
# if you will use gpu, then you should install tensorflow-gpu package
|
||||||
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org tensorflow-gpu
|
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org tensorflow-gpu
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# install deepface from pypi release (might be out-of-the-date)
|
# install deepface from pypi release (might be out-of-the-date)
|
||||||
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org deepface
|
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org deepface
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# install deepface from source code (always up-to-date)
|
# install deepface from source code (always up-to-date)
|
||||||
RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org -e .
|
RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org -e .
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# some packages are optional in deepface. activate if your task depends on one.
|
# some packages are optional in deepface. activate if your task depends on one.
|
||||||
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org cmake==3.24.1.1
|
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org cmake==3.24.1.1
|
||||||
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org dlib==19.20.0
|
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org dlib==19.20.0
|
||||||
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org lightgbm==2.3.1
|
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org lightgbm==2.3.1
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# environment variables
|
# environment variables
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# run the app (re-configure port if necessary)
|
# run the app (re-configure port if necessary)
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user