From 05200799589048b4678a6d09c4002189d071360b Mon Sep 17 00:00:00 2001 From: Damien Caro Date: Thu, 21 Jun 2018 23:37:03 -0700 Subject: [PATCH 1/3] fixed bdist_wheel setup error --- downloadblob.sh | 10 ++++++---- flaskwebapp/dockerfile | 1 + flaskwebapp/requirements.txt | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/downloadblob.sh b/downloadblob.sh index af749ba..795cf62 100644 --- a/downloadblob.sh +++ b/downloadblob.sh @@ -8,9 +8,9 @@ # Downloading Azure CLI on the VSTS build agent machine apt-get update -y && apt-get install -y python libssl-dev libffi-dev python-dev build-essential -curl -L https://azurecliprod.blob.core.windows.net/install.py -o install.py -printf "/usr/azure-cli\n/usr/bin" | python install.py -az +#curl -L https://azurecliprod.blob.core.windows.net/install.py -o install.py +#printf "/usr/azure-cli\n/usr/bin" | python install.py +#az #Setting environment variables to access the blob container export AZURE_STORAGE_ACCOUNT=$1 @@ -20,7 +20,9 @@ export blob_name1=$4 export blob_name2=$5 # Downloading Blob -mkdir flaskwebapp +if [ ! d flaskwebapp ]; then + mkdir flaskwebapp +fi az storage blob download --container-name $container_name --name $blob_name1 --file flaskwebapp/$blob_name1 --output table az storage blob download --container-name $container_name --name $blob_name2 --file flaskwebapp/$blob_name2 --output table az storage blob list --container-name $container_name --output table diff --git a/flaskwebapp/dockerfile b/flaskwebapp/dockerfile index ee92044..f2ce86c 100644 --- a/flaskwebapp/dockerfile +++ b/flaskwebapp/dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ rm /etc/nginx/sites-enabled/default && \ cp /code/nginx/app /etc/nginx/sites-available/ && \ ln -s /etc/nginx/sites-available/app /etc/nginx/sites-enabled/ && \ + pip install wheel && \ pip install -r /code/requirements.txt && \ pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.0-cp27-cp27mu-linux_x86_64.whl diff --git a/flaskwebapp/requirements.txt b/flaskwebapp/requirements.txt index dacae23..573c431 100644 --- a/flaskwebapp/requirements.txt +++ b/flaskwebapp/requirements.txt @@ -1,3 +1,4 @@ +setuptools >= 0.8.0 pillow click==6.7 configparser==3.5.0 From dc5ae791732a68cdfeea0ff4b052a750d847deee Mon Sep 17 00:00:00 2001 From: Damien Caro Date: Mon, 25 Jun 2018 18:52:33 -0700 Subject: [PATCH 2/3] Updated initialization of RedNet model --- flaskwebapp/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaskwebapp/driver.py b/flaskwebapp/driver.py index b80e120..0b33baa 100644 --- a/flaskwebapp/driver.py +++ b/flaskwebapp/driver.py @@ -33,7 +33,7 @@ def init(): # Load model and load the model from brainscript (3rd index) trainedModel = load_model(MODEL_FILE) - trainedModel = combine([trainedModel.outputs[3].owner]) + trainedModel = combine([trainedModel.outputs[2].owner]) end = t.default_timer() loadTimeMsg = "Model loading time: {0} ms".format(round((end - start) * 1000, 2)) From fac630643f36e2d666bab014091de0b14eab8f4d Mon Sep 17 00:00:00 2001 From: Damien Caro Date: Tue, 26 Jun 2018 00:07:10 -0700 Subject: [PATCH 3/3] changed version to 2.0 --- tests/integration/test_api.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_api.sh b/tests/integration/test_api.sh index 4e62529..df6f85d 100644 --- a/tests/integration/test_api.sh +++ b/tests/integration/test_api.sh @@ -6,10 +6,11 @@ MODEL_API_URL=$1 # Simple API test echo "Testing API" reply=$(curl -s $MODEL_API_URL/version) -if [[ $reply == 2.0rc1 ]]; then +if [[ $reply == 2.0 ]]; then echo -e "Successfully validated version API call" else echo "Basic API call failed" + echo "Reply: "$reply exit 1 fi