forked from chineseocr/chineseocr
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2da42b1
commit 30e4bea
Showing
3 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# Python support can be specified down to the minor or micro version | ||
# (e.g. 3.6 or 3.6.3). | ||
# OS Support also exists for jessie & stretch (slim and full). | ||
# See https://hub.docker.com/r/library/python/ for all supported Python | ||
# tags from Docker Hub. | ||
FROM floydhub/pytorch:0.2.0-py3.15 | ||
LABEL Name=chineseocr Version=0.0.1 | ||
FROM ubuntu | ||
MAINTAINER https://github.com/chineseocr/chineseocr | ||
LABEL version="1.0" | ||
EXPOSE 8080 | ||
|
||
WORKDIR /app | ||
ADD . /app | ||
RUN cd detector/utils && sh make-for-cpu.sh | ||
RUN git submodule init && git submodule update | ||
RUN cd darknet/ && make && cp libdarknet.so .. | ||
VOLUME /app/models | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
CMD ["python3", "app.py"] | ||
RUN apt-get update | ||
RUN apt-get install libsm6 libxrender1 libxext-dev gcc -y | ||
##下载Anaconda3 python 环境安装包 放置在chineseocr目录 url地址https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh | ||
WORKDIR /chineseocr | ||
ADD . /chineseocr | ||
RUN cd /chineseocr && sh -c '/bin/echo -e "\nyes\n\nyes" | sh Anaconda3-2019.03-Linux-x86_64.sh' | ||
RUN echo -e "\ny" | /root/anaconda3/bin/conda install python=3.6 | ||
RUN /root/anaconda3/bin/pip install easydict opencv-contrib-python==3.4.2.16 Cython h5py pandas requests bs4 matplotlib lxml -U pillow keras==2.1.5 tensorflow==1.8 -i https://pypi.tuna.tsinghua.edu.cn/simple/ | ||
RUN /root/anaconda3/bin/pip install web.py==0.40.dev0 | ||
RUN echo -e "\ny" | /root/anaconda3/bin/conda install pytorch-cpu torchvision-cpu -c pytorch | ||
RUN rm Anaconda3-2019.03-Linux-x86_64.sh | ||
#RUN cd /chineseocr/text/detector/utils && sh make-for-cpu.sh | ||
#RUN conda clean -p | ||
#RUN conda clean -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
##拉取基础镜像 | ||
docker build -t chineseocr . | ||
##启动服务 | ||
docker run -d -p 8080:8080 chineseocr /root/anaconda3/bin/python app.py | ||
|
||
|