π Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.
[python] Add CI of pushing package to pypi.
SWHL4002e7f5f3f0
diff --git a/.github/workflows/gen_whl_to_pypi_layout.yml b/.github/workflows/gen_whl_to_pypi_layout.ymlindex 335a32a..0643c46 100644--- a/.github/workflows/gen_whl_to_pypi_layout.yml+++ b/.github/workflows/gen_whl_to_pypi_layout.yml@@ -23,13 +23,13 @@ jobs:uses: suisei-cn/actions-download-file@v1id: downloadfile3 # Remember to give an ID if you need the output filenamewith:- url: "https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/required_for_whl_v1.1.0.zip"+ url: "https://github.com/RapidAI/RapidOCR/releases/download/v1.1.0/rapid_layout_models.zip"target: ./- name: Decompressshell: powershellrun: |- Expand-7Zip -ArchiveFileName ./required_for_whl_v1.1.0.zip -TargetPath .\+ Expand-7Zip -ArchiveFileName ./rapid_layout_models.zip -TargetPath .\- name: List all fileshell: cmd@@ -39,14 +39,14 @@ jobs:- name: Unit testingsshell: cmdrun: |- set git_keep_path=%cur_dir%\python\resoureces\models\.gitkeep+ set git_keep_path=%cur_dir%\python\rapid_structure\rapid_layout\models\.gitkeepdel %git_keep_path%- move required_for_whl_v1.1.0\resources\models\* python\resources\models\- cd python+ move rapid_layout_models\* python\rapid_structure\rapid_layout\models\+ cd python/rapid_structurepip install -r requirements.txt- pip install onnxruntime==1.11.0 openvino==2022.2.0+ pip install onnxruntimecd tests- pytest test_det.py test_cls.py test_rec.py+ pytest test_layout.pyGenerateWHL_PushPyPi:needs: UnitTesting@@ -64,19 +64,11 @@ jobs:chmod 600 ~/.ssh/id_rsachmod 700 ~/.ssh && chmod 600 ~/.ssh/*- - name: Run setup_onnxruntime.py+ - name: Run setuprun: |- cd python- mkdir rapidocr_onnxruntime_t- mv rapidocr_onnxruntime rapidocr_onnxruntime_t- mv rapidocr_onnxruntime_t rapidocr_onnxruntime- cd rapidocr_onnxruntime- echo "from .rapidocr_onnxruntime.rapid_ocr_api import RapidOCR" > __init__.py-- cd ..+ cd python/rapid_structurepython -m pip install --upgrade pip- python setup_onnxruntime.py bdist_wheel- mv dist ../+ python setup_layout.py bdist_wheel# - name: Publish distribution π¦ to Test PyPI# uses: pypa/[email protected]diff --git a/python/rapid_structure/requirements.txt b/python/rapid_structure/requirements.txtindex 63b47e1..25b4f10 100644--- a/python/rapid_structure/requirements.txt+++ b/python/rapid_structure/requirements.txt@@ -1,6 +1,5 @@-numpy==1.21.6-onnxruntime==1.10.0-opencv_python==4.6.0.66-setuptools==61.2.0+numpy>=1.21.6+opencv_python>=4.6.0.66+setuptools>=61.2.0PyYAMLpytest\ No newline at end of file