...
 
Commits (2)
    https://gitcode.net/ide-demo/cnocr-demo/-/commit/1e4201431a81209846f3bce2dead904cc92ca387 support torch>=2.0 2023-04-11T23:19:22+08:00 breezedeus breezedeus@163.com https://gitcode.net/ide-demo/cnocr-demo/-/commit/e78f62a2bd7d5b687dba91841dd52295a8a70c30 Merge pull request #241 from breezedeus/dev 2023-04-11T23:28:57+08:00 BreezeDeus breezedeus@163.com support torch>=2.0
FROM ubuntu:bionic
FROM python:3.9
ENV TZ=Asia/Shanghai
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y apt-transport-https ca-certificates gpg-agent curl software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa \
&& curl https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg -o /tmp/gpg.key && apt-key add /tmp/gpg.key \
&& add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" \
&& apt-get update && apt-get install -y cmake python3.8 && ln -s /usr/bin/python3.8 /usr/bin/python \
&& apt-get install -y python3-pip python3.8-dev \
&& python -m pip install -U pip \
&& rm -f /usr/bin/pip && ln -s /usr/bin/pip3 /usr/bin/pip
RUN apt-get update && apt-get install -y python3-opencv libglib2.0-0 libsm6 libxext6 libxrender-dev
RUN apt-get update && apt-get install -y python3-opencv libglib2.0-0 libsm6 libxext6 libxrender-dev && rm -rf /var/lib/apt/lists/*
RUN pip install -U pip && pip install cnocr[serve] --index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install -U pip && pip install torch==1.11.0 \
&& pip install -U cnocr[serve]==2.2.2 --extra-index-url https://pypi.org/simple
CMD ["cnocr", "serve", "-H", "0.0.0.0", "-p", "8501"]
EXPOSE 8501
......@@ -34,7 +34,7 @@ package:
rm -rf build
python setup.py sdist bdist_wheel
VERSION = 2.2.2.2
VERSION = 2.2.2.3
upload:
python -m twine upload dist/cnocr-$(VERSION)* --verbose
......
......@@ -17,4 +17,4 @@
# specific language governing permissions and limitations
# under the License.
__version__ = '2.2.2.2'
__version__ = '2.2.2.3'
......@@ -3,7 +3,7 @@
click
tqdm
torch>=1.8.0,<2.0
torch>=1.8.0
torchvision>=0.9.0
numpy
pytorch-lightning>=1.6.0
......
......@@ -39,7 +39,7 @@ exec(
required = [
"click",
"tqdm",
"torch>=1.8.0,<2.0",
"torch>=1.8.0",
"torchvision>=0.9.0",
'numpy',
"pytorch-lightning>=1.6.0",
......