Installation for S&D
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

2 years ago
2 years ago
2 years ago
  1. FROM rcarjan/nginx-php:7.4
  2. LABEL maintainer="Radu Liviu Carjan"
  3. ## Add required files
  4. RUN mkdir /var/www/dewarp
  5. ADD dewarp /var/www/dewarp
  6. ## Install libreoffice
  7. RUN apt-add-repository -y ppa:libreoffice/ppa && \
  8. apt-get install -y \
  9. libreoffice \
  10. software-properties-common
  11. # Install python & popple PDF convertor
  12. RUN add-apt-repository -y ppa:deadsnakes/ppa && \
  13. apt-get install -y \
  14. supervisor \
  15. python3.8 \
  16. python3.8-dev \
  17. python3.8-distutils \
  18. libpoppler-cpp-dev \
  19. poppler-utils
  20. ## Install Tesseract OCR, Pandoc & other dependencies
  21. RUN add-apt-repository -y ppa:alex-p/tesseract-ocr-devel && \
  22. apt-get install -y \
  23. tesseract-ocr \
  24. unpaper \
  25. unoconv \
  26. pandoc
  27. ## Configure correct python version, install PIP
  28. RUN rm /usr/bin/python3 && \
  29. ln -s /usr/bin/python3.8 /usr/bin/python3 && \
  30. apt-get install -y python-is-python3 && \
  31. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
  32. python get-pip.py && \
  33. rm -rf get-pip.py && \
  34. pip install --upgrade pip
  35. ## Install PIP packages
  36. RUN pip install \
  37. pdftotext \
  38. supervisor \
  39. opencv-python
  40. WORKDIR /var/www/dewarp
  41. RUN pip install -r requirements.txt
  42. RUN mkdir /var/log/queue
  43. WORKDIR /var/www/ingest