From 610de57e644531835757e41aca4f68263d43d29b Mon Sep 17 00:00:00 2001 From: yangyaming Date: Mon, 19 Jun 2017 23:24:58 +0800 Subject: [PATCH 1/2] Fix ci following: 1. Unify the dependency installation process in setup.sh. 2. Change the version of package scipy from 0.13.0b1 to 0.13.1 --- .travis/unittest.sh | 4 ++-- deep_speech_2/requirements.txt | 3 +-- deep_speech_2/setup.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 deep_speech_2/setup.sh diff --git a/.travis/unittest.sh b/.travis/unittest.sh index 23f15094c8..ad223eb4a9 100755 --- a/.travis/unittest.sh +++ b/.travis/unittest.sh @@ -8,8 +8,8 @@ abort(){ unittest(){ cd $1 > /dev/null - if [ -f "requirements.txt" ]; then - pip install -r requirements.txt + if [ -f "setup.sh" ]; then + sh setup.sh fi if [ $? != 0 ]; then exit 1 diff --git a/deep_speech_2/requirements.txt b/deep_speech_2/requirements.txt index c37e88ffe7..0183ecf01f 100644 --- a/deep_speech_2/requirements.txt +++ b/deep_speech_2/requirements.txt @@ -1,4 +1,3 @@ SoundFile==0.9.0.post1 wget==3.2 -scikits.samplerate==0.3.3 -scipy==0.13.0b1 +scipy==0.13.1 diff --git a/deep_speech_2/setup.sh b/deep_speech_2/setup.sh new file mode 100644 index 0000000000..c59ef82ff1 --- /dev/null +++ b/deep_speech_2/setup.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# install python dependencies +if [ -f 'requirements.txt' ]; then + pip install -r requirements.txt +fi + +if [ $? != 0 ]; then + exit 1 +fi + +# install scikits.samplerate +curl -O "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" +if [ $? != 0 ]; then + echo "Download libsamplerate-0.1.9.tar.gz failed !!!" + exit 1 +fi +tar -xvf libsamplerate-0.1.9.tar.gz +cd libsamplerate-0.1.9 +./configure && make && make install +cd - +rm -rf libsamplerate-0.1.9 +rm libsamplerate-0.1.9.tar.gz +pip install scikits.samplerate==0.3.3 +if [ $? != 0 ]; then + echo "Install sckikits.samplerate failed !!!" + exit 1 +fi From b04028c24471bbd496b4b075251e92db6a43d6c5 Mon Sep 17 00:00:00 2001 From: yangyaming Date: Mon, 19 Jun 2017 23:46:44 +0800 Subject: [PATCH 2/2] Follow comments. --- deep_speech_2/README.md | 2 +- deep_speech_2/setup.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deep_speech_2/README.md b/deep_speech_2/README.md index 23e0b412b5..0cdb203d21 100644 --- a/deep_speech_2/README.md +++ b/deep_speech_2/README.md @@ -5,7 +5,7 @@ Please replace `$PADDLE_INSTALL_DIR` with your own paddle installation directory. ``` -pip install -r requirements.txt +sh setup.sh export LD_LIBRARY_PATH=$PADDLE_INSTALL_DIR/Paddle/third_party/install/warpctc/lib:$LD_LIBRARY_PATH ``` diff --git a/deep_speech_2/setup.sh b/deep_speech_2/setup.sh index c59ef82ff1..1ae2a5eee0 100644 --- a/deep_speech_2/setup.sh +++ b/deep_speech_2/setup.sh @@ -4,8 +4,8 @@ if [ -f 'requirements.txt' ]; then pip install -r requirements.txt fi - if [ $? != 0 ]; then + echo "Install python dependencies failed !!!" exit 1 fi @@ -23,6 +23,8 @@ rm -rf libsamplerate-0.1.9 rm libsamplerate-0.1.9.tar.gz pip install scikits.samplerate==0.3.3 if [ $? != 0 ]; then - echo "Install sckikits.samplerate failed !!!" + echo "Install scikits.samplerate failed !!!" exit 1 fi + +echo "Install all dependencies successfully."