abhishekrs4 commited on
Commit
39371b7
1 Parent(s): e13f1c3

added dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.8.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # install linux package dependencies
6
+ RUN apt-get update -y && \
7
+ apt-get -y install gcc g++ && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ # can copy files only from current working directory where docker builds
11
+ # cannot copy files from arbitrary directories
12
+
13
+ COPY ./artifacts/ /data/models/
14
+ COPY ./requirements.txt .
15
+
16
+ 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
17
+ RUN pip install pybind11==2.12.0
18
+ RUN pip install -r requirements.txt
19
+
20
+ COPY ./iam_line_recognition/*.py ./iam_line_recognition/
21
+ COPY ./*.py .
22
+
23
+ EXPOSE 7860
24
+
25
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]