diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 94c37bd51..c63596671 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1101,7 +1101,7 @@ jobs: name: "Upload STT packages to PyPI" runs-on: ubuntu-20.04 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - needs: [create-release, build-python-Linux, build-python-macOS, build-python-Windows, build-python-LinuxArmv7, build-python-LinuxAarch64] + needs: [create-release, build-python-Linux, build-python-macOS, build-python-Windows, build-python-LinuxArmv7] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -1171,15 +1171,9 @@ jobs: - uses: actions/download-artifact@v3 with: name: stt-tflite-3.7-armv7.whl - - uses: actions/download-artifact@v3 - with: - name: stt-tflite-3.7-aarch64.whl - uses: actions/download-artifact@v3 with: name: stt-tflite-3.9-armv7.whl - - uses: actions/download-artifact@v3 - with: - name: stt-tflite-3.9-aarch64.whl - name: Upload artifacts to GitHub release uses: ./.github/actions/upload-release-asset with: @@ -1190,7 +1184,7 @@ jobs: name: "Upload native client artifacts to release assets" runs-on: ubuntu-20.04 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - needs: [create-release, build-lib-Windows, build-lib-Linux, build-universal-lib-macOS, build-lib-LinuxAarch64, build-lib-LinuxArmv7] + needs: [create-release, build-lib-Windows, build-lib-Linux, build-universal-lib-macOS, build-lib-LinuxArmv7] steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 @@ -1225,10 +1219,6 @@ jobs: with: name: native_client.tflite.linux.armv7.tar.xz - run: mv native_client.tar.xz native_client.tflite.linux.armv7.tar.xz - - uses: actions/download-artifact@v3 - with: - name: native_client.tflite.linux.aarch64.tar.xz - - run: mv native_client.tar.xz native_client.tflite.linux.aarch64.tar.xz - run: ls -lh - uses: ./.github/actions/upload-release-asset with: @@ -1612,7 +1602,7 @@ jobs: python-version: "3.7" - name: Install system deps run: - brew install coreutils + brew install coreutils curl - name: Select Xcode version run: | sudo xcode-select --switch /Applications/Xcode_13.1.app/Contents/Developer @@ -1622,6 +1612,7 @@ jobs: with: path: ~/arm-target key: ${{ runner.os }}-arm-brew-cache + - name: Install arm64 deps if: matrix.arch == 'arm64' && steps.cache.outputs.cache-hit != 'true' run: | @@ -1631,16 +1622,12 @@ jobs: export PATH="$HOME/arm-target/bin:$PATH" cd ~/arm-target - mkdir arm-brew && curl -L https://github.com/Homebrew/brew/tarball/932d2cf3b77c9439a57b6a43577fc8d3b6399a62 | tar xz --strip 1 -C arm-brew + mkdir arm-brew && curl -L https://github.com/Homebrew/brew/archive/refs/tags/4.1.13.tar.gz | tar xz --strip 1 -C arm-brew - export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_CACHE=~/arm-target/brew-cache - export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 - ~/arm-target/arm-brew/bin/brew fetch --deps --bottle-tag=arm64_big_sur sox opusfile |\ - grep -E "(Downloaded to:|Already downloaded:)" |\ - grep -v pkg-config |\ - awk '{ print $3 }' |\ - xargs -n 1 ~/arm-target/arm-brew/bin/brew install --ignore-dependencies --force-bottle + export HOMEBREW_FORCE_BREWED_CURL=1 + ~/arm-target/arm-brew/bin/brew fetch --debug --force --bottle-tag=arm64_big_sur curl sox opusfile + ~/arm-target/arm-brew/bin/brew install --debug $(brew --cache --bottle-tag=arm64_big_sur curl sox opusfile) # Install host version of pkg-config so we can call it in the build system ~/arm-target/arm-brew/bin/brew install pkg-config @@ -1825,6 +1812,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 1 + - uses: actions/setup-python@v4 + if: matrix.arch == 'x64' + with: + python-version: 3.7.9 - uses: actions/download-artifact@v3 with: name: "native_client.tflite.macOS.tar.xz" @@ -2486,7 +2477,7 @@ jobs: repackage-nodejs-allplatforms: name: "Repackage NodeJS / ElectronJS for multiplatforms" runs-on: ubuntu-20.04 - needs: [build-nodejs-macOS, build-nodejs-Windows, build-nodejs-Linux, build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64] + needs: [build-nodejs-macOS, build-nodejs-Windows, build-nodejs-Linux, build-nodejs-LinuxArmv7] steps: - uses: actions/checkout@v3 with: @@ -2515,10 +2506,6 @@ jobs: with: name: "nodewrapper-tflite-Linux_armv7.tar.gz" path: /tmp/nodewrapper-Linux_armv7/ - - uses: actions/download-artifact@v3 - with: - name: "nodewrapper-tflite-Linux_aarch64.tar.gz" - path: /tmp/nodewrapper-Linux_aarch64/ - name: Extract nodewrapper archives run: | tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-macOS_arm64/wrapper.tar.gz @@ -2526,7 +2513,6 @@ jobs: tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Windows_amd64/wrapper.tar.gz tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_amd64/wrapper.tar.gz tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_armv7/wrapper.tar.gz - tar -C ${{ github.workspace }}/native_client/javascript -xzvf /tmp/nodewrapper-Linux_aarch64/wrapper.tar.gz - run: | make -C native_client/javascript clean npm-pack PROJECT_NAME=stt - uses: actions/upload-artifact@v3 @@ -2870,7 +2856,7 @@ jobs: samplerate: ${{ matrix.samplerate }} model-kind: ${{ matrix.models }} timeout-minutes: 5 - # Linux Armv7 and Aarch64 jobs + # Linux Armv7 jobs build-lib-LinuxArmv7: name: "LinArmv7|Build libstt+client" runs-on: ubuntu-20.04 @@ -2900,35 +2886,6 @@ jobs: with: name: "libstt.tflite.linux.armv7.zip" path: ${{ github.workspace }}/artifacts/libstt.zip - build-lib-LinuxAarch64: - name: "LinAarch64|Build libstt+client" - runs-on: ubuntu-20.04 - env: - SYSTEM_TARGET: rpi3-armv8 - SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-armbian64-buster - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: 'recursive' - - uses: actions/setup-python@v4 - with: - python-version: "3.7" - - name: Install chroot - uses: ./.github/actions/multistrap - with: - arch: aarch64 - - run: ./ci_scripts/tf-setup.sh - - run: ./ci_scripts/aarch64-build.sh - - run: ./ci_scripts/package.sh - - uses: actions/upload-artifact@v3 - with: - name: "native_client.tflite.linux.aarch64.tar.xz" - path: ${{ github.workspace }}/artifacts/native_client.tar.xz - - uses: actions/upload-artifact@v3 - with: - name: "libstt.tflite.linux.aarch64.zip" - path: ${{ github.workspace }}/artifacts/libstt.zip build-python-LinuxArmv7: name: "LinArmv7|Build Python bindings" runs-on: ubuntu-20.04 @@ -3066,145 +3023,6 @@ jobs: with: name: "stt_intermediate-tflite-armv7.tgz" path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz - build-python-LinuxAarch64: - name: "LinAarch64|Build Python bindings" - runs-on: ubuntu-20.04 - needs: [build-lib-LinuxAarch64, swig_Linux] - strategy: - matrix: - include: - - python-version: 3.7 - system-raspbian: multistrap-armbian64-buster - arch: aarch64 - - python-version: 3.9 - system-raspbian: multistrap-armbian64-bullseye - arch: aarch64 - fail-fast: false - env: - DEBIAN_FRONTEND: "noninteractive" - SYSTEM_TARGET: rpi3-armv8 - SYSTEM_RASPBIAN: ${{ github.workspace }}/${{ matrix.system-raspbian }} - steps: - - run: | - sudo apt-get install -y --no-install-recommends - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: 'recursive' - - uses: actions/download-artifact@v3 - with: - name: "native_client.tflite.linux.aarch64.tar.xz" - path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/ - - run: | - cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/ - tar xf native_client.tar.xz - - uses: actions/download-artifact@v3 - with: - name: "swig_Linux" - path: ${{ github.workspace }}/native_client/ds-swig/ - - name: Link ds-swig into swig - run: | - ls -hal ${{ github.workspace }}/native_client/ds-swig/bin - ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig - chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: "Install chroot" - uses: ./.github/actions/multistrap - with: - arch: ${{ matrix.arch }} - pyver: ${{ matrix.python-version }} - - id: get_numpy - uses: ./.github/actions/numpy_vers - with: - pyver: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -U pip setuptools wheel - - name: Download cross-build toolchain - run: | - cd tensorflow - bazel build --cpu=aarch64 @local_config_embedded_arm//:toolchain - - uses: ./.github/actions/install-xldd - with: - target: ${{ env.SYSTEM_TARGET }} - - uses: ./.github/actions/python-build - with: - numpy_build: "${{ steps.get_numpy.outputs.build_version }}" - numpy_dep: "${{ steps.get_numpy.outputs.dep_version }}" - target: ${{ env.SYSTEM_TARGET }} - chroot: ${{ env.SYSTEM_RASPBIAN }} - - uses: actions/upload-artifact@v3 - with: - name: "stt-tflite-${{ matrix.python-version }}-aarch64.whl" - path: ${{ github.workspace }}/native_client/python/dist/*.whl - build-nodejs-LinuxAarch64: - name: "LinAarch64|Build NodeJS and ElectronJS" - runs-on: ubuntu-20.04 - needs: [build-lib-LinuxAarch64, swig_Linux] - env: - SYSTEM_TARGET: rpi3-armv8 - SYSTEM_RASPBIAN: ${{ github.workspace }}/multistrap-armbian64-buster - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: 'recursive' - - uses: actions/download-artifact@v3 - with: - name: "native_client.tflite.linux.aarch64.tar.xz" - path: ${{ github.workspace }}/tensorflow/bazel-bin/native_client/ - - run: | - cd ${{ github.workspace }}/tensorflow/bazel-bin/native_client/ - tar xf native_client.tar.xz - - uses: actions/download-artifact@v3 - with: - name: "swig_Linux" - path: ${{ github.workspace }}/native_client/ds-swig/ - - name: Link ds-swig into swig - run: | - ls -hal ${{ github.workspace }}/native_client/ds-swig/bin - ln -s ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig - chmod +x ${{ github.workspace }}/native_client/ds-swig/bin/ds-swig ${{ github.workspace }}/native_client/ds-swig/bin/swig - - name: "Install chroot" - uses: ./.github/actions/multistrap - with: - arch: aarch64 - - uses: actions/setup-node@v3 - with: - node-version: 12 - - uses: actions/cache@v3 - id: node-headers-cache - with: - path: native_client/javascript/headers/nodejs/ - key: node-headers-12.7.0_17.0.1 - - uses: actions/cache@v3 - id: electron-headers-cache - with: - path: native_client/javascript/headers/electronjs/ - key: electron-headers-12.0.0_21.0.0 - - name: Download cross-build toolchain - run: | - cd tensorflow - bazel build --cpu=aarch64 @local_config_embedded_arm//:toolchain - - uses: ./.github/actions/install-xldd - with: - target: ${{ env.SYSTEM_TARGET }} - - uses: ./.github/actions/node-build - with: - nodejs_versions: "12.7.0 13.0.0 14.0.0 15.0.0 16.0.0 17.0.1" - electronjs_versions: "12.0.0 13.0.0 14.0.0 15.0.0 16.0.0 21.0.0" - target: ${{ env.SYSTEM_TARGET }} - chroot: ${{ env.SYSTEM_RASPBIAN }} - - uses: actions/upload-artifact@v3 - with: - name: "nodewrapper-tflite-Linux_aarch64.tar.gz" - path: ${{ github.workspace }}/native_client/javascript/wrapper.tar.gz - - uses: actions/upload-artifact@v3 - with: - name: "stt_intermediate-tflite-aarch64.tgz" - path: ${{ github.workspace }}/native_client/javascript/stt-*.tgz build-test-chroot: name: "Lin|Build test chroot" runs-on: ubuntu-20.04 @@ -3218,12 +3036,6 @@ jobs: - arch: armv7 python-version: 3.9 system: bullseye - - arch: aarch64 - python-version: 3.7 - system: buster - - arch: aarch64 - python-version: 3.9 - system: bullseye fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp @@ -3249,7 +3061,7 @@ jobs: test-cpp-LinuxArm: name: "LinArm*|Test C++ binary" runs-on: ubuntu-20.04 - needs: [ build-lib-LinuxArmv7, build-lib-LinuxAarch64, train-test-model-Linux, build-test-chroot ] + needs: [ build-lib-LinuxArmv7, train-test-model-Linux, build-test-chroot ] if: ${{ github.event_name == 'pull_request' }} strategy: matrix: @@ -3286,22 +3098,6 @@ jobs: system: "bullseye" models: "prod" samplerate: "16000" - - arch: "aarch64" - system: "buster" - models: "test" - samplerate: "8000" - - arch: "aarch64" - system: "buster" - models: "test" - samplerate: "16000" - - arch: "aarch64" - system: "buster" - models: "prod" - samplerate: "8000" - - arch: "aarch64" - system: "buster" - models: "prod" - samplerate: "16000" fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp @@ -3354,7 +3150,7 @@ jobs: test-py-LinuxArm: name: "LinArm*|Test Python bindings" runs-on: ubuntu-20.04 - needs: [ build-python-LinuxArmv7, build-python-LinuxAarch64, train-test-model-Linux, build-test-chroot ] + needs: [ build-python-LinuxArmv7, train-test-model-Linux, build-test-chroot ] if: ${{ github.event_name == 'pull_request' }} strategy: matrix: @@ -3399,26 +3195,6 @@ jobs: python-version: "3.9" models: "prod" samplerate: "16000" - - arch: aarch64 - system: "buster" - python-version: "3.7" - models: "test" - samplerate: "8000" - - arch: aarch64 - system: "buster" - python-version: "3.7" - models: "test" - samplerate: "16000" - - arch: aarch64 - system: "buster" - python-version: "3.7" - models: "prod" - samplerate: "8000" - - arch: aarch64 - system: "buster" - python-version: "3.7" - models: "prod" - samplerate: "16000" fail-fast: false env: CI_TMP_DIR: ${{ github.workspace }}/tmp @@ -3471,11 +3247,11 @@ jobs: test-nodejs-LinuxArm: name: "LinArm*|Test NodeJS bindings" runs-on: ubuntu-20.04 - needs: [ build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64, train-test-model-Linux, build-test-chroot ] + needs: [ build-nodejs-LinuxArmv7, train-test-model-Linux, build-test-chroot ] if: ${{ github.event_name == 'pull_request' }} strategy: matrix: - arch: ["armv7", "aarch64"] + arch: ["armv7"] # https://nodejs.org/en/about/releases/ nodejs-version: [12, 14, 16, 17] models: ["test"] @@ -3533,12 +3309,12 @@ jobs: test-electronjs-LinuxArm: name: "LinArm*|Test ElectronJS bindings" runs-on: ubuntu-20.04 - needs: [ build-nodejs-LinuxArmv7, build-nodejs-LinuxAarch64, train-test-model-Linux, build-test-chroot ] + needs: [ build-nodejs-LinuxArmv7, train-test-model-Linux, build-test-chroot ] # Disable this task because it seems qemu does not work super-well with ElectronJS if: ${{ github.event_name == 'disabled' }} strategy: matrix: - arch: ["armv7", "aarch64"] + arch: ["armv7"] electronjs-version: [12.0.0, 13.0.0, 14.0.0, 15.0.0, 16.0.0] models: ["test"] samplerate: ["16000"] diff --git a/Dockerfile.build b/Dockerfile.build index 318e8218f..57811a128 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,7 +1,7 @@ # Please refer to the USING documentation, "Dockerfile for building from source" # Need devel version cause we need /usr/include/cudnn.h -FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 +FROM ghcr.io/iarahealth/cuda:10.1-cudnn7-devel-ubuntu18.04 # >> START Install base software diff --git a/native_client/javascript/package.json.in b/native_client/javascript/package.json.in index 9b45b416c..b14a3c643 100644 --- a/native_client/javascript/package.json.in +++ b/native_client/javascript/package.json.in @@ -40,7 +40,7 @@ }, "devDependencies": { "electron": "^1.7.9", - "node-gyp": "9.x", + "node-gyp": "9.3.x", "typescript": "3.8.x", "typedoc": "0.17.x", "@types/argparse": "1.0.x",