29 lines
624 B
Docker
29 lines
624 B
Docker
FROM python:3.6
|
|
LABEL maintainer="Stanisław Gołębiewski <stagol@st.amu.edu.pl>"
|
|
|
|
RUN apt-get update \
|
|
&& apt-get -y install \
|
|
tesseract-ocr \
|
|
tesseract-ocr-jpn \
|
|
&& apt-get clean
|
|
|
|
WORKDIR /opt/app
|
|
|
|
# COPY . /opt/app/
|
|
COPY ./Pipfile /opt/app/Pipfile
|
|
|
|
RUN pip3 install pipenv_to_requirements gunicorn && \
|
|
pipenv run pipenv_to_requirements && \
|
|
pip3 install --no-cache -r requirements.txt
|
|
|
|
COPY . /opt/app/
|
|
RUN mv ./ocr_module/tesseract_data/pol.traineddata /usr/share/tesseract-ocr/4.00/tessdata && \
|
|
touch db.sqlite3
|
|
|
|
CMD exec gunicorn bk_api.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
|
|
|
|
|
|
|
|
|
|