#!/bin/bash

set -xe

source $(dirname "$0")/tc-tests-utils.sh

nodever=$1

if [ -z "${nodever}" ]; then
    echo "No node version given, aborting."
    exit 1
fi;

model_source=${DEEPSPEECH_PROD_MODEL}
model_name=$(basename "${model_source}")

model_source_mmap=${DEEPSPEECH_PROD_MODEL_MMAP}
model_name_mmap=$(basename "${model_source_mmap}")

download_data

node --version
npm --version
npm install ${DEEPSPEECH_NODEJS}/deepspeech-${DS_VERSION}.tgz

export PATH=$HOME/node_modules/.bin/:$PATH

run_prod_inference_tests
