Merge pull request #2586 from mozilla/tflite-packages
Build and publish Python TFLite package as deepspeech-tflite
This commit is contained in:
commit
35e04d383e
@ -25,7 +25,11 @@ do_bazel_build
|
|||||||
|
|
||||||
do_deepspeech_binary_build
|
do_deepspeech_binary_build
|
||||||
|
|
||||||
do_deepspeech_python_build
|
if [ "${runtime}" = "tflite" ]; then
|
||||||
|
do_deepspeech_python_build "--tflite"
|
||||||
|
else
|
||||||
|
do_deepspeech_python_build
|
||||||
|
fi
|
||||||
|
|
||||||
do_deepspeech_nodejs_build
|
do_deepspeech_nodejs_build
|
||||||
|
|
||||||
|
@ -4,7 +4,9 @@ build:
|
|||||||
# Make sure builds are ready
|
# Make sure builds are ready
|
||||||
- "linux-arm64-cpu-opt"
|
- "linux-arm64-cpu-opt"
|
||||||
- "darwin-amd64-cpu-opt"
|
- "darwin-amd64-cpu-opt"
|
||||||
|
- "darwin-amd64-tflite-opt"
|
||||||
- "linux-amd64-cpu-opt"
|
- "linux-amd64-cpu-opt"
|
||||||
|
- "linux-amd64-tflite-opt"
|
||||||
- "linux-amd64-gpu-opt"
|
- "linux-amd64-gpu-opt"
|
||||||
- "linux-rpi3-cpu-opt"
|
- "linux-rpi3-cpu-opt"
|
||||||
- "node-package-gpu"
|
- "node-package-gpu"
|
||||||
@ -25,11 +27,14 @@ build:
|
|||||||
artifacts_deps:
|
artifacts_deps:
|
||||||
python:
|
python:
|
||||||
- "darwin-amd64-cpu-opt"
|
- "darwin-amd64-cpu-opt"
|
||||||
|
- "darwin-amd64-tflite-opt"
|
||||||
- "linux-amd64-cpu-opt"
|
- "linux-amd64-cpu-opt"
|
||||||
|
- "linux-amd64-tflite-opt"
|
||||||
- "linux-amd64-gpu-opt"
|
- "linux-amd64-gpu-opt"
|
||||||
- "linux-rpi3-cpu-opt"
|
- "linux-rpi3-cpu-opt"
|
||||||
- "linux-arm64-cpu-opt"
|
- "linux-arm64-cpu-opt"
|
||||||
- "win-amd64-cpu-opt"
|
- "win-amd64-cpu-opt"
|
||||||
|
- "win-amd64-tflite-opt"
|
||||||
- "win-amd64-gpu-opt"
|
- "win-amd64-gpu-opt"
|
||||||
javascript:
|
javascript:
|
||||||
# GPU package
|
# GPU package
|
||||||
|
@ -4,7 +4,9 @@ build:
|
|||||||
# Make sure builds are ready
|
# Make sure builds are ready
|
||||||
# - "linux-arm64-cpu-opt" Aarch64 packages are refused by upload.pypi.org
|
# - "linux-arm64-cpu-opt" Aarch64 packages are refused by upload.pypi.org
|
||||||
- "darwin-amd64-cpu-opt"
|
- "darwin-amd64-cpu-opt"
|
||||||
|
- "darwin-amd64-tflite-opt"
|
||||||
- "linux-amd64-cpu-opt"
|
- "linux-amd64-cpu-opt"
|
||||||
|
- "linux-amd64-tflite-opt"
|
||||||
- "linux-amd64-gpu-opt"
|
- "linux-amd64-gpu-opt"
|
||||||
- "linux-rpi3-cpu-opt"
|
- "linux-rpi3-cpu-opt"
|
||||||
- "win-amd64-cpu-opt"
|
- "win-amd64-cpu-opt"
|
||||||
@ -23,7 +25,9 @@ build:
|
|||||||
java_aar: []
|
java_aar: []
|
||||||
python:
|
python:
|
||||||
- "darwin-amd64-cpu-opt"
|
- "darwin-amd64-cpu-opt"
|
||||||
|
- "darwin-amd64-tflite-opt"
|
||||||
- "linux-amd64-cpu-opt"
|
- "linux-amd64-cpu-opt"
|
||||||
|
- "linux-amd64-tflite-opt"
|
||||||
- "linux-amd64-gpu-opt"
|
- "linux-amd64-gpu-opt"
|
||||||
- "linux-rpi3-cpu-opt"
|
- "linux-rpi3-cpu-opt"
|
||||||
- "win-amd64-cpu-opt"
|
- "win-amd64-cpu-opt"
|
||||||
|
@ -1149,7 +1149,7 @@ do_deepspeech_python_build()
|
|||||||
{
|
{
|
||||||
cd ${DS_DSDIR}
|
cd ${DS_DSDIR}
|
||||||
|
|
||||||
rename_to_gpu=$1
|
package_option=$1
|
||||||
|
|
||||||
unset PYTHON_BIN_PATH
|
unset PYTHON_BIN_PATH
|
||||||
unset PYTHONPATH
|
unset PYTHONPATH
|
||||||
@ -1169,8 +1169,10 @@ do_deepspeech_python_build()
|
|||||||
mkdir -p wheels
|
mkdir -p wheels
|
||||||
|
|
||||||
SETUP_FLAGS=""
|
SETUP_FLAGS=""
|
||||||
if [ "${rename_to_gpu}" = "--cuda" ]; then
|
if [ "${package_option}" = "--cuda" ]; then
|
||||||
SETUP_FLAGS="--project_name deepspeech-gpu"
|
SETUP_FLAGS="--project_name deepspeech-gpu"
|
||||||
|
elif [ "${package_option}" = "--tflite" ]; then
|
||||||
|
SETUP_FLAGS="--project_name deepspeech-tflite"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for pyver_conf in ${SUPPORTED_PYTHON_VERSIONS}; do
|
for pyver_conf in ${SUPPORTED_PYTHON_VERSIONS}; do
|
||||||
|
@ -41,7 +41,11 @@ do_deepspeech_binary_build
|
|||||||
|
|
||||||
# Those are the versions available on NuGet.org
|
# Those are the versions available on NuGet.org
|
||||||
export SUPPORTED_PYTHON_VERSIONS="3.5.4 3.6.7 3.7.1 3.8.0"
|
export SUPPORTED_PYTHON_VERSIONS="3.5.4 3.6.7 3.7.1 3.8.0"
|
||||||
do_deepspeech_python_build "${cuda}"
|
if [ "${runtime}" = "tflite" ]; then
|
||||||
|
do_deepspeech_python_build "--tflite"
|
||||||
|
else
|
||||||
|
do_deepspeech_python_build "${cuda}"
|
||||||
|
fi
|
||||||
|
|
||||||
do_deepspeech_nodejs_build "${cuda}"
|
do_deepspeech_nodejs_build "${cuda}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user