Skip to content

Commit bfa6c00

Browse files
committed
更新docker镜像,支持tr2.3
1 parent 8f1aba7 commit bfa6c00

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM python:3.7-slim
22

33
RUN sed -i 's#http://deb.debian.org#https://mirrors.163.com#g' /etc/apt/sources.list
4-
RUN apt update && apt install -y libglib2.0-dev libsm6 libxrender1 libxext-dev supervisor \
4+
RUN apt update && apt install -y libglib2.0-dev libsm6 libxrender1 libxext-dev supervisor build-essential \
55
&& rm -rf /var/lib/apt/lists/*
66

77
RUN /usr/local/bin/python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
88
COPY ./requirements.txt ./TrWebOCR/
9-
RUN pip install -r ./TrWebOCR/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
9+
RUN pip3 install -r ./TrWebOCR/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
1010
COPY . ./TrWebOCR
1111

12-
RUN python ./TrWebOCR/install.py
12+
RUN python3 ./TrWebOCR/install.py
1313
EXPOSE 8089
1414
CMD ["supervisord","-c","/TrWebOCR/supervisord.conf"]

README.md

+5-13
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ python backend/main.py [--port=8089][--open_gpu=0]
5353
# --open_gpu 是否开启gpu 默认是0(不开启),可设置为1(开启)
5454
```
5555

56-
看到以下输出则代表安装成功:
56+
看到以下输出则代表安装成功:
5757
```shell script
5858
tr 2.3.0 https://github.com/myhub/tr
5959
Server is running: http://192.168.31.95:8089
@@ -117,23 +117,15 @@ res = requests.post(url=url, data={'img': img_b64})
117117
![验证码识别](https://images.alisen39.com/20200501173211.png)
118118

119119
## 更新记录
120+
* 2020年08月17日
121+
更新Dockerfile,docker镜像支持tr2.3
122+
120123
* 2020年07月30日
121124
支持启动命令选择GPU/CPU
122125

123126
* 2020年07月26日
124127
更新tr2.0版,支持GPU
125128

126-
* 2020年07月23日
127-
修改README
128-
129-
* 2020年06月14日
130-
优化Dockerfile,解决Build失败报错
131-
Dockerfile需要下载的部分使用国内源,提高build速度
132-
增加supervisor守护python进程
133-
134-
* 2020年06月13日
135-
增加接口调用示例
136-
137129
[更多记录 >>>](https://github.com/alisen39/TrWebOCR/blob/master/updateHistory.md)
138130

139131

@@ -144,6 +136,6 @@ Apache 2.0
144136
* 感谢 [myhub](https://github.com/myhub) 和它的开源项目[Tr](https://github.com/myhub/tr)
145137

146138
## 最后
147-
项目在[GitHub](https://github.com/alisen39/TrWebOCR)[码云](https://gitee.com/alisen39/TrWebOCR)上同步更新,国内朋友可以通过码云clone项目~
139+
项目在 [GitHub](https://github.com/alisen39/TrWebOCR)[码云](https://gitee.com/alisen39/TrWebOCR) 上同步更新,国内朋友可以通过码云clone项目~
148140

149141
如果你也喜欢这个项目,不妨给个star (^.^)✨

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
libtorch==1.2.0.1
22
numpy==1.14.6
33
opencv-python==3.4.4.19
4-
Pillow==5.4.0
4+
Pillow==7.1.0
55
tornado==6.0.4
6-
tr

updateHistory.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## 更新记录
2+
* 2020年08月17日
3+
更新Dockerfile,docker镜像支持tr2.3
4+
25
* 2020年07月30日
36
支持启动命令选择GPU/CPU
47

0 commit comments

Comments
 (0)