Skip to content

Commit

Permalink
Unify version definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Lissy committed Apr 27, 2018
1 parent ae146d0 commit e017848
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 17 deletions.
8 changes: 8 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2.0-alpha.0
6 changes: 5 additions & 1 deletion native_client/javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion native_client/javascript/package.json.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "$(PROJECT_NAME)",
"version" : "0.1.1",
"version" : "$(PROJECT_VERSION)",
"description" : "DeepSpeech NodeJS bindings",
"main" : "./index",
"bin": {
Expand Down
5 changes: 4 additions & 1 deletion native_client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
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),
Expand All @@ -47,7 +50,7 @@ class BuildExtFirst(build):
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},
Expand Down
1 change: 0 additions & 1 deletion taskcluster/.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ build:
package: ''
args:
tests_cmdline: ''
deepspeech_pkg_name: ''
convert_graphdef: ''
1 change: 0 additions & 1 deletion taskcluster/test-armbian-opt-base.tyml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion taskcluster/test-linux-opt-base.tyml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion taskcluster/test-raspbian-opt-base.tyml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion tc-node-tests-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tc-node-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion tc-python-tests-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tc-python-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions tc-tests-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion tc-train-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e017848

Please sign in to comment.