|
FROM python:3.8.10-slim |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update -y && \ |
|
apt-get -y install gcc g++ && \ |
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
|
COPY ./artifacts/ /data/models/ |
|
COPY ./requirements.txt . |
|
|
|
RUN pip install torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cpu |
|
RUN pip install pybind11==2.12.0 |
|
RUN pip install -r requirements.txt |
|
|
|
COPY ./iam_line_recognition/*.py ./iam_line_recognition/ |
|
COPY ./*.py . |
|
|
|
EXPOSE 7860 |
|
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"] |
|
|