#!/usr/bin/env bash
#ht: sim/argus/run.sh

set -euo pipefail

NVM_FILE=~/.nvm/nvm.sh
if ! [ -f "$NVM_FILE" ]; then
  echo 'nvm not found. Installing nvm...'
  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
fi

source "$NVM_FILE"

# This violates the hermeticity property of Bazel and modifies global state, so
# if you run it locally, you'll get a new version of node. Congrats!
nvm install node

BOKEH_NODEJS_PATH=$(which node) ./mined_metric/builder/metrics_impl/pisces/utils/analyze_data_py $@
