2019-11-25 13:43:17 +01:00
|
|
|
FROM python:3.7
|
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install \
|
|
|
|
tesseract-ocr \
|
|
|
|
tesseract-ocr-jpn \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
WORKDIR /install
|
|
|
|
|
2019-12-08 23:00:18 +01:00
|
|
|
COPY ./bk_api ./bk_api
|
2019-11-25 14:49:45 +01:00
|
|
|
|
2019-12-08 23:00:18 +01:00
|
|
|
WORKDIR /install/bk_api
|
|
|
|
|
|
|
|
RUN mv ./ocr_module/tesseract_data/pol.traineddata /usr/share/tesseract-ocr/4.00/tessdata
|
2019-11-25 13:43:17 +01:00
|
|
|
|
|
|
|
RUN pip3 install pipenv_to_requirements gunicorn && \
|
|
|
|
pipenv run pipenv_to_requirements && \
|
|
|
|
pip3 install --no-cache -r requirements.txt
|
|
|
|
|
2019-12-08 23:00:18 +01:00
|
|
|
CMD exec gunicorn bk_api.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
2019-11-25 14:16:09 +01:00
|
|
|
|
2019-11-25 14:13:34 +01:00
|
|
|
|
2019-11-25 13:43:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|