Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # This is a sample Dockerfile you can modify to deploy your own app based on face_recognition
  2. FROM python:3.6-slim-stretch
  3. RUN apt-get -y update
  4. RUN apt-get install -y --fix-missing \
  5. build-essential \
  6. cmake \
  7. gfortran \
  8. git \
  9. wget \
  10. curl \
  11. graphicsmagick \
  12. libgraphicsmagick1-dev \
  13. libatlas-dev \
  14. libavcodec-dev \
  15. libavformat-dev \
  16. libgtk2.0-dev \
  17. libjpeg-dev \
  18. liblapack-dev \
  19. libswscale-dev \
  20. pkg-config \
  21. python3-dev \
  22. python3-numpy \
  23. software-properties-common \
  24. zip \
  25. && apt-get clean && rm -rf /tmp/* /var/tmp/*
  26. RUN cd ~ && \
  27. mkdir -p dlib && \
  28. git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
  29. cd dlib/ && \
  30. python3 setup.py install --yes USE_AVX_INSTRUCTIONS
  31. # The rest of this file just runs an example script.
  32. # If you wanted to use this Dockerfile to run your own app instead, maybe you would do this:
  33. # COPY . /root/your_app_or_whatever
  34. # RUN cd /root/your_app_or_whatever && \
  35. # pip3 install -r requirements.txt
  36. # RUN whatever_command_you_run_to_start_your_app
  37. COPY . /root/face_recognition
  38. RUN cd /root/face_recognition && \
  39. pip3 install -r requirements.txt && \
  40. python3 setup.py install
  41. CMD cd /root/face_recognition/examples && \
  42. python3 recognize_faces_in_pictures.py