leaderboard / run-adhoc.sh
ayushi0430's picture
update readme
a4a4c60
#!/bin/bash
# Safely execute this bash script
# e exit on first failure
# x all executed commands are printed to the terminal
# u unset variables are errors
# a export all variables to the environment
# E any trap on ERR is inherited by shell functions
# -o pipefail | produces a failure code if any stage fails
set -Eeuoxa pipefail
LOCAL_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
for ARGUMENT in "$@"
do
KEY=$(echo $ARGUMENT | cut -f1 -d=)
KEY_LENGTH=${#KEY}
VALUE="${ARGUMENT:$KEY_LENGTH+1}"
export "$KEY"="$VALUE"
done
echo "Model passed is: $LOCAL_MODEL_NAME"
docker buildx build --platform=linux/amd64 -t adhoc .
docker run -it --rm --platform=linux/amd64 -v $LOCAL_DIRECTORY/output-data:/code/data -e LOCAL_MODEL_NAME=$LOCAL_MODEL_NAME adhoc python adhoc.py