#!/bin/bash
set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"

# Copy hrt_model_exec into build context
HRT_BIN="$(which hrt_model_exec)"
echo "Copying hrt_model_exec from $HRT_BIN"
cp "$HRT_BIN" "$SCRIPT_DIR/hrt_model_exec"

docker build -f Dockerfile.bayese_perf -t hrt_perf_bayese:v1.24.5 "$SCRIPT_DIR"

# Clean up copied binary
rm -f "$SCRIPT_DIR/hrt_model_exec"
