File size: 693 Bytes
39371b7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.8.10-slim

WORKDIR /app

# install linux package dependencies
RUN apt-get update -y && \
    apt-get -y install gcc g++ && \
    rm -rf /var/lib/apt/lists/*

# can copy files only from current working directory where docker builds
# cannot copy files from arbitrary directories

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"]