Add NNCF support in OpenVINO export (#4671)

Co-authored-by: 下北泽miHoMo红茶坊 <39751846+kisaragychihaya@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-08-31 15:19:44 +02:00 committed by GitHub
parent d2cf7acce0
commit 45ba99973d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 45 deletions

View file

@ -8,18 +8,25 @@ on:
branches: [main]
workflow_dispatch:
inputs:
dockerfile:
type: choice
description: Select Dockerfile
options:
- Dockerfile-arm64
- Dockerfile-jetson
- Dockerfile-python
- Dockerfile-cpu
- Dockerfile
Dockerfile:
type: boolean
description: Use Dockerfile
default: true
Dockerfile-cpu:
type: boolean
description: Use Dockerfile-cpu
Dockerfile-arm64:
type: boolean
description: Use Dockerfile-arm64
Dockerfile-jetson:
type: boolean
description: Use Dockerfile-jetson
Dockerfile-python:
type: boolean
description: Use Dockerfile-python
push:
type: boolean
description: Push image to Docker Hub
description: Push images to Docker Hub
default: true
jobs:
@ -93,28 +100,28 @@ jobs:
VERSION_TAG: ${{ steps.get_version.outputs.version_tag }}
- name: Build Image
if: github.event_name == 'push' || github.event.inputs.dockerfile == matrix.dockerfile
if: github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true'
run: |
docker build --platform ${{ matrix.platforms }} -f docker/${{ matrix.dockerfile }} \
-t ultralytics/ultralytics:${{ matrix.tags }} \
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} .
- name: Run Tests
if: (github.event_name == 'push' || github.event.inputs.dockerfile == matrix.dockerfile) && matrix.platforms == 'linux/amd64' # arm64 images not supported on GitHub CI runners
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' # arm64 images not supported on GitHub CI runners
run: docker run ultralytics/ultralytics:${{ matrix.tags }} /bin/bash -c "pip install pytest && pytest tests"
- name: Run Benchmarks
# WARNING: Dockerfile (GPU) error on TF.js export 'module 'numpy' has no attribute 'object'.
if: (github.event_name == 'push' || github.event.inputs.dockerfile == matrix.dockerfile) && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile' # arm64 images not supported on GitHub CI runners
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile' # arm64 images not supported on GitHub CI runners
run: docker run ultralytics/ultralytics:${{ matrix.tags }} yolo benchmark model=yolov8n.pt imgsz=160 verbose=0.26
- name: Push Docker Image with Ultralytics version tag
if: (github.event_name == 'push' || (github.event.inputs.dockerfile == matrix.dockerfile && github.event.inputs.push == 'true')) && steps.check_tag.outputs.exists == 'false'
if: (github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')) && steps.check_tag.outputs.exists == 'false'
run: |
docker push ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}
- name: Push Docker Image with latest tag
if: github.event_name == 'push' || (github.event.inputs.dockerfile == matrix.dockerfile && github.event.inputs.push == 'true')
if: github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')
run: |
docker push ultralytics/ultralytics:${{ matrix.tags }}
if [[ "${{ matrix.tags }}" == "latest" ]]; then