* 更新箱号图片抓拍conta_captureV3.0.2.0 #536
Workflow file for this run
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
name: 箱号图片抓拍发布 | |
on: | |
push: | |
tags: | |
- conta_captureV* | |
jobs: | |
release: | |
name: 箱号图片抓拍发布 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" | |
steps: | |
- name: 克隆代码 | |
uses: actions/checkout@v3 | |
- name: 创建发行版本 | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body_path: README.md | |
draft: false | |
prerelease: false | |
amd64_job: | |
name: ${{ matrix.device_type }}箱号图片抓拍打包 | |
container: | |
image: jadehh/container_ocr:amd64-packing-1.0.1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" | |
device_type: ["Paddle","Amd64"] | |
steps: | |
- name: 下载代码 | |
uses: actions/checkout@v3 | |
with: | |
repository: jadehh/ContainerOCR | |
ref: conta_capture | |
path: code | |
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | |
- name: 安装pip环境 | |
run: pip install -r code/requirements.txt | |
- name: Paddle打包编译 | |
if: ${{ matrix.device_type=='Paddle'}} | |
run: | | |
cd code | |
pip install -r requirements/Paddle/requirements.txt | |
python packing_app.py \ | |
--head_str "import sys\nsys.path.append('/usr/local/conta_detect-1.0/python_lib')\nimport paddle\n" \ | |
--is_exec False | |
- name: Amd64打包编译 | |
if: ${{ matrix.device_type=='Amd64'}} | |
run: | | |
cd code | |
python packing_app.py \ | |
--head_str "import sys\nsys.path.append('/usr/local/site-packages/')\nimport paddle\n"\ | |
--name 箱号图片抓拍Amd64 \ | |
--app_name conta_capture_amd64 \ | |
--lib_path conta_capture_amd64_lib64 \ | |
--is_exec False | |
- name: 发布 | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | |
"./code/Output/*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限 | |
Py310: | |
name: ${{ matrix.device_type }}箱号识别服务打包 | |
container: | |
image: jadehh/python:3.8.16-ubuntu18.04 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" | |
device_type: [ "ONNX" ] | |
steps: | |
- name: 下载代码 | |
uses: actions/checkout@v3 | |
with: | |
repository: jadehh/ContainerOCR | |
ref: conta_capture | |
path: code | |
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | |
- name: 安装pip环境 | |
run: | | |
pip install -r code/requirements.txt | |
pip uninstall -y numpy | |
- name: ONNX打包编译 | |
run: | | |
cd code | |
pip install -r requirements/ONNX/requirements.txt | |
python packing_app.py \ | |
--extra_sys_str /usr/local/site-packages,/usr/local/opencv \ | |
--name 箱号图片抓拍ONNX \ | |
--app_name local_conta_capture_onnx \ | |
--lib_path local_conta_capture_x86_lib64 \ | |
--is_exec False | |
- name: 发布 | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | |
"./code/Output/*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限 | |
aarch64_job: | |
# The host should always be Linux | |
name: ${{ matrix.device_type }}箱号图片抓拍打包 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" | |
device_type: ["RKNN","Ascend"] | |
steps: | |
- name: 下载代码 | |
uses: actions/checkout@v3 | |
with: | |
repository: jadehh/ContainerOCR | |
ref: conta_capture | |
path: code | |
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT | |
- name: RKNN打包环境准备 | |
if: ${{ matrix.device_type=='RKNN'}} | |
uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: aarch64 | |
distro: ubuntu18.04 | |
# Not required, but speeds up builds by storing container images in | |
# a GitHub package registry. | |
githubToken: ${{ github.token }} | |
dockerRunArgs: | | |
--volume "${PWD}/code:/code" | |
base_image: jadehh/miniconda3:aarch64-4.9.2 | |
# Set an output parameter `uname` for use in subsequent steps | |
run: | | |
cd /code | |
pip install -r requirements.txt | |
ls requirements/RKNN/requirements.txt -l | |
pip install -r requirements/RKNN/requirements.txt | |
python packing_app.py \ | |
--head_str \ | |
"import sys \nsys.path.append('/usr/local/site-packages/')\nimport ruamel\nimport ruamel.yaml\nimport scipy\nimport scipy.spatial\nimport absl\nimport absl.logging\nimport google\nimport google.protobuf\nimport google.protobuf.descriptor\nimport wrapt\nimport google.protobuf.any_pb2\nimport absl.app\nimport google.protobuf.wrappers_pb2\nimport opt_einsum\nimport gast\nimport astunparse\nimport termcolor\nimport google.protobuf.json_format\nimport absl.testing\nimport absl.testing.parameterized\nimport flatbuffers\nimport requests\nimport h5py\nimport lmdb\nimport sklearn\nimport networkx\nimport onnx.numpy_helper\nimport onnx.backend\nimport onnx.backend.base\nimport ply\nimport ply.lex\nimport ply.yacc\nimport dill\n" \ | |
--app_name local_conta_capture_rknn \ | |
--lib_path local_conta_capture_aarch64_lib64 \ | |
--is_exec False | |
- name: Ascend打包环境准备 | |
if: ${{ matrix.device_type=='Ascend'}} | |
uses: uraimo/run-on-arch-action@v2 | |
with: | |
arch: aarch64 | |
distro: ubuntu18.04 | |
# Not required, but speeds up builds by storing container images in | |
# a GitHub package registry. | |
githubToken: ${{ github.token }} | |
dockerRunArgs: | | |
--volume "${PWD}/code:/code" | |
base_image: jadehh/miniconda3:aarch64-4.9.2 | |
# Set an output parameter `uname` for use in subsequent steps | |
run: | | |
cd /code | |
ls requirements/Ascend/requirements.txt -l | |
pip install -r requirements.txt | |
pip install -r requirements/Ascend/requirements.txt | |
python packing_app.py \ | |
--head_str "import sys \nsys.path.append('/usr/local/Ascend/nnrt/latest/python/site-packages')\nsys.path.append('/usr/local/site-packages')\nfrom acllite.acllite_model import AclLiteModel\nfrom acllite.acllite_imageproc import AclLiteImageProc\nfrom acllite.acllite_image import AclLiteImage\nfrom acllite.acllite_resource import AclLiteResource\n" \ | |
--app_name local_conta_capture_ascend \ | |
--lib_path local_conta_capture_aarch64_lib64 \ | |
--is_exec False | |
- name: 发布 | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | |
"./code/Output/*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限 | |