parent
ae146d0619
commit
e01784894e
8
RELEASE.md
Normal file
8
RELEASE.md
Normal file
@ -0,0 +1,8 @@
|
||||
Making a (new) release of the codebase
|
||||
======================================
|
||||
- Update version in VERSION file, commit
|
||||
- Open PR, ensure all tests are passing properly
|
||||
- Merge the PR
|
||||
- Fetch the new master, tag it with (hopefully) the same version as in VERSION
|
||||
- Push that to Github
|
||||
- New build should be triggered and new packages should be made
|
@ -2,6 +2,7 @@ NODE_BUILD_TOOL ?= node-pre-gyp
|
||||
NODE_ABI_TARGET ?=
|
||||
NODE_BUILD_VERBOSE ?= --verbose
|
||||
PROJECT_NAME ?= deepspeech
|
||||
PROJECT_VERSION ?= $(shell cat ../../VERSION)
|
||||
|
||||
include ../definitions.mk
|
||||
|
||||
@ -19,7 +20,10 @@ really-clean: clean clean-npm-pack
|
||||
rm -fr ./lib/
|
||||
|
||||
package.json: package.json.in
|
||||
sed 's/$$(PROJECT_NAME)/$(PROJECT_NAME)/' package.json.in > package.json
|
||||
sed \
|
||||
-e 's/$$(PROJECT_NAME)/$(PROJECT_NAME)/' \
|
||||
-e 's/$$(PROJECT_VERSION)/$(PROJECT_VERSION)/' \
|
||||
package.json.in > package.json && cat package.json
|
||||
|
||||
configure: deepspeech_wrap.cxx package.json
|
||||
$(NODE_BUILD_TOOL) configure $(NODE_BUILD_VERBOSE)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "$(PROJECT_NAME)",
|
||||
"version" : "0.1.1",
|
||||
"version" : "$(PROJECT_VERSION)",
|
||||
"description" : "DeepSpeech NodeJS bindings",
|
||||
"main" : "./index",
|
||||
"bin": {
|
||||
|
@ -26,6 +26,9 @@ if '--project_name' in sys.argv:
|
||||
sys.argv.remove('--project_name')
|
||||
sys.argv.pop(project_name_idx)
|
||||
|
||||
with open('../VERSION', 'r') as ver:
|
||||
project_version = ver.read()
|
||||
|
||||
class BuildExtFirst(build):
|
||||
sub_commands = [('build_ext', build.has_ext_modules),
|
||||
('build_py', build.has_pure_modules),
|
||||
@ -47,7 +50,7 @@ utils = Extension('deepspeech._utils',
|
||||
setup(name = project_name,
|
||||
description = 'A library for running inference on a DeepSpeech model',
|
||||
author = 'Mozilla',
|
||||
version = '0.1.1',
|
||||
version = project_version,
|
||||
package_dir = {'deepspeech': 'python'},
|
||||
packages = ['deepspeech'],
|
||||
cmdclass = {'build': BuildExtFirst},
|
||||
|
@ -18,5 +18,4 @@ build:
|
||||
package: ''
|
||||
args:
|
||||
tests_cmdline: ''
|
||||
deepspeech_pkg_name: ''
|
||||
convert_graphdef: ''
|
||||
|
@ -38,7 +38,6 @@ then:
|
||||
in:
|
||||
CONVERT_GRAPHDEF_MEMMAPPED: ${build.convert_graphdef}
|
||||
DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_arm64_build}/artifacts/public
|
||||
DEEPSPEECH_PYTHON_PACKAGE: https://queue.taskcluster.net/v1/task/${linux_arm64_build}/artifacts/public/${build.deepspeech_pkg_name}
|
||||
DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public
|
||||
DEEPSPEECH_AOT_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_arm64_aot_prod}/artifacts/public
|
||||
DEEPSPEECH_TEST_MODEL: https://queue.taskcluster.net/v1/task/${training}/artifacts/public/output_graph.pb
|
||||
|
@ -39,7 +39,6 @@ then:
|
||||
in:
|
||||
CONVERT_GRAPHDEF_MEMMAPPED: ${build.convert_graphdef}
|
||||
DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_amd64_build}/artifacts/public
|
||||
DEEPSPEECH_PYTHON_PACKAGE: https://queue.taskcluster.net/v1/task/${linux_amd64_build}/artifacts/public/${build.deepspeech_pkg_name}
|
||||
DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public
|
||||
DEEPSPEECH_AOT_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_amd64_aot_test}/artifacts/public
|
||||
DEEPSPEECH_LIBCTC: https://queue.taskcluster.net/v1/task/${linux_amd64_ctc}/artifacts/public/decoder.tar.xz
|
||||
|
@ -38,7 +38,6 @@ then:
|
||||
in:
|
||||
CONVERT_GRAPHDEF_MEMMAPPED: ${build.convert_graphdef}
|
||||
DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_rpi3_build}/artifacts/public
|
||||
DEEPSPEECH_PYTHON_PACKAGE: https://queue.taskcluster.net/v1/task/${linux_rpi3_build}/artifacts/public/${build.deepspeech_pkg_name}
|
||||
DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public
|
||||
DEEPSPEECH_AOT_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_rpi3_aot_prod}/artifacts/public
|
||||
DEEPSPEECH_TEST_MODEL: https://queue.taskcluster.net/v1/task/${training}/artifacts/public/output_graph.pb
|
||||
|
@ -8,7 +8,6 @@ build:
|
||||
apt-get -qq -y install ${python.packages_trusty.apt}
|
||||
args:
|
||||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 2.7.14:mu mozilla deepspeech"
|
||||
deepspeech_pkg_name: 'deepspeech-0.1.1-cp27-cp27mu-manylinux1_x86_64.whl'
|
||||
metadata:
|
||||
name: "DeepSpeech Linux AMD64 CPU training Py2.7 mu (DS)"
|
||||
description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 Python 2.7 mu with DeepSpeech package installed, CPU only, optimized version"
|
||||
|
@ -8,7 +8,6 @@ build:
|
||||
apt-get -qq -y install ${python.packages_trusty.apt}
|
||||
args:
|
||||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 3.6.4:m mozilla deepspeech"
|
||||
deepspeech_pkg_name: 'deepspeech-0.1.1-cp36-cp36m-manylinux1_x86_64.whl'
|
||||
metadata:
|
||||
name: "DeepSpeech Linux AMD64 CPU training Py3.6 (DS)"
|
||||
description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 Python 3.6 with DeepSpeech package installed, CPU only, optimized version"
|
||||
|
@ -8,7 +8,6 @@ build:
|
||||
apt-get -qq -y install ${python.packages_trusty.apt}
|
||||
args:
|
||||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 2.7.14:mu upstream deepspeech"
|
||||
deepspeech_pkg_name: 'deepspeech-0.1.1-cp27-cp27mu-manylinux1_x86_64.whl'
|
||||
metadata:
|
||||
name: "DeepSpeech Linux AMD64 CPU upstream training Py2.7 mu (DS)"
|
||||
description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 using upstream TensorFlow Python 2.7 mu with DeepSpeech package installed, CPU only, optimized version"
|
||||
|
@ -8,7 +8,6 @@ build:
|
||||
apt-get -qq -y install ${python.packages_trusty.apt}
|
||||
args:
|
||||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 3.6.4:m upstream deepspeech"
|
||||
deepspeech_pkg_name: 'deepspeech-0.1.1-cp36-cp36m-manylinux1_x86_64.whl'
|
||||
metadata:
|
||||
name: "DeepSpeech Linux AMD64 CPU upstream training Py3.6 (DS)"
|
||||
description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 using upstream TensorFlow Python 3.6 with DeepSpeech package installed, CPU only, optimized version"
|
||||
|
@ -21,7 +21,7 @@ download_data
|
||||
|
||||
node --version
|
||||
npm --version
|
||||
npm install ${DEEPSPEECH_NODEJS}/deepspeech-0.1.1.tgz
|
||||
npm install ${DEEPSPEECH_NODEJS}/deepspeech-${DS_VERSION}.tgz
|
||||
|
||||
export PATH=$HOME/node_modules/.bin/:$PATH
|
||||
|
||||
|
@ -22,9 +22,9 @@ export NODE_PATH="${NODE_ROOT}/node_modules/"
|
||||
export PATH="${NODE_PATH}/.bin/:$PATH"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_AOT_ARTIFACTS_ROOT}/deepspeech-0.1.1.tgz
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_AOT_ARTIFACTS_ROOT}/deepspeech-${DS_VERSION}.tgz
|
||||
else
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_NODEJS}/deepspeech-0.1.1.tgz
|
||||
npm install --prefix ${NODE_ROOT} ${DEEPSPEECH_NODEJS}/deepspeech-${DS_VERSION}.tgz
|
||||
fi
|
||||
|
||||
run_all_inference_tests
|
||||
|
@ -47,7 +47,8 @@ pyenv virtualenv ${pyver} ${PYENV_NAME}
|
||||
source ${PYENV_ROOT}/versions/${pyver}/envs/${PYENV_NAME}/bin/activate
|
||||
|
||||
platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); arch = platform.machine().lower(); plat = "manylinux1" if plat == "linux" and arch == "x86_64" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));')
|
||||
deepspeech_pkg="deepspeech-0.1.1-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
whl_ds_version="$(python -c 'from pkg_resources import parse_version; print(parse_version("'${DS_VERSION}'"))')"
|
||||
deepspeech_pkg="deepspeech-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
|
||||
pip install --only-binary :all: --upgrade ${DEEPSPEECH_ARTIFACTS_ROOT}/${deepspeech_pkg} | cat
|
||||
|
||||
|
@ -42,7 +42,8 @@ pyenv virtualenv ${pyver} ${PYENV_NAME}
|
||||
source ${PYENV_ROOT}/versions/${pyver}/envs/${PYENV_NAME}/bin/activate
|
||||
|
||||
platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); arch = platform.machine().lower(); plat = "manylinux1" if plat == "linux" and arch == "x86_64" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));')
|
||||
deepspeech_pkg="deepspeech-0.1.1-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
whl_ds_version="$(python -c 'from pkg_resources import parse_version; print(parse_version("'${DS_VERSION}'"))')"
|
||||
deepspeech_pkg="deepspeech-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
|
||||
if [ "${aot_model}" = "--aot" ]; then
|
||||
deepspeech_pkg_url=${DEEPSPEECH_AOT_ARTIFACTS_ROOT}/${deepspeech_pkg}
|
||||
|
@ -37,6 +37,8 @@ export BAZEL_AOT_TARGETS="
|
||||
//native_client:libdeepspeech_model.so
|
||||
"
|
||||
|
||||
export DS_VERSION="$(cat ${DS_DSDIR}/VERSION)"
|
||||
|
||||
model_source="${DEEPSPEECH_TEST_MODEL}"
|
||||
model_name="$(basename "${model_source}")"
|
||||
model_name_mmap="$(basename -s ".pb" "${model_source}").pbmm"
|
||||
|
@ -15,6 +15,9 @@ fi;
|
||||
|
||||
pyver=$(echo "${pyver_full}" | cut -d':' -f1)
|
||||
|
||||
# 2.7.x => 27
|
||||
pyver_pkg=$(echo "${pyver}" | cut -d'.' -f1,2 | tr -d '.')
|
||||
|
||||
py_unicode_type=$(echo "${pyver_full}" | cut -d':' -f2)
|
||||
if [ "${py_unicode_type}" = "m" ]; then
|
||||
pyconf="ucs2"
|
||||
@ -48,8 +51,12 @@ if [ "${tf}" = "upstream" ]; then
|
||||
pip install --upgrade -r ${HOME}/DeepSpeech/ds/requirements.txt | cat
|
||||
fi;
|
||||
|
||||
platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); arch = platform.machine().lower(); plat = "manylinux1" if plat == "linux" and arch == "x86_64" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));')
|
||||
whl_ds_version="$(python -c 'from pkg_resources import parse_version; print(parse_version("'${DS_VERSION}'"))')"
|
||||
deepspeech_pkg="deepspeech-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl"
|
||||
|
||||
if [ "${ds}" = "deepspeech" ]; then
|
||||
pip install "${DEEPSPEECH_PYTHON_PACKAGE}" | cat
|
||||
pip install ${DEEPSPEECH_ARTIFACTS_ROOT}/${deepspeech_pkg} | cat
|
||||
python -c "import tensorflow; from deepspeech.utils import audioToInputVector"
|
||||
|
||||
# Since this build depends on the completion of the whole deepspeech package
|
||||
|
Loading…
x
Reference in New Issue
Block a user