diff --git a/run-docker_jpk.sh b/run-docker_jpk.sh new file mode 100755 index 0000000000000000000000000000000000000000..45225a88dbb6e6b6d0c89f08f63c7074151fe8ce --- /dev/null +++ b/run-docker_jpk.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=$(readlink -f "$0") +# Absolute path this script is in, thus /home/user/bin +SCRIPTPATH=$(dirname "$SCRIPT") + +BREVITAS_REPO=https://github.com/Xilinx/brevitas.git +EXAMPLES_REPO=https://github.com/maltanar/brevitas_cnv_lfc.git + +BREVITAS_LOCAL=$SCRIPTPATH/brevitas +EXAMPLES_LOCAL=$SCRIPTPATH/brevitas_cnv_lfc + +# clone dependency repos +git clone --branch feature/finn_onnx_export $BREVITAS_REPO $BREVITAS_LOCAL || git -C "$BREVITAS_LOCAL" pull +git clone $EXAMPLES_REPO $EXAMPLES_LOCAL || git -C "$EXAMPLES_LOCAL" pull + +# remove possible temp files created from previous execution +Â /tools/xgs/bin/sudo rm -rf .eggs tests/__pycache__/ + +echo "Mounting $SCRIPTPATH into /workspace/finn" +echo "Mounting $SCRIPTPATH/brevitas into /workspace/brevitas" +echo "Mounting $SCRIPTPATH/brevitas_cnv_lfc into /workspace/brevitas_cnv_lfc" +# Build the FINN Docker image +docker build --tag=finn . +# Launch container with current directory mounted +docker run --rm --name finn_dev -it \ +-v $SCRIPTPATH:/workspace/finn \ +-v $SCRIPTPATH/brevitas:/workspace/brevitas \ +-v $SCRIPTPATH/brevitas_cnv_lfc:/workspace/brevitas_cnv_lfc \ +finn bash