Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions downloadblob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions flaskwebapp/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion flaskwebapp/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions flaskwebapp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
setuptools >= 0.8.0
pillow
click==6.7
configparser==3.5.0
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down