Skip to content

Commit

Permalink
Disable interactive docker run
Browse files Browse the repository at this point in the history
This needs to be properly refactored and probably be exposed to the
outside so the user is in control. Maybe default to interactive runs
while introducing some flag to turn this off?
  • Loading branch information
iksnagreb committed Jan 28, 2024
1 parent 1bcf6d3 commit a208cd1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ elif [ "$1" = "build_custom" ]; then
BUILD_CUSTOM_DIR=$(readlink -f "$2")
FLOW_NAME=${3:-build}
FINN_DOCKER_EXTRA+="-v $BUILD_CUSTOM_DIR:$BUILD_CUSTOM_DIR -w $BUILD_CUSTOM_DIR "
DOCKER_INTERACTIVE="-it"
# DOCKER_INTERACTIVE="-it"
#FINN_HOST_BUILD_DIR=$BUILD_DATAFLOW_DIR/build
gecho "Running build_custom: $BUILD_CUSTOM_DIR/$FLOW_NAME.py"
DOCKER_CMD="python -mpdb -cc -cq $FLOW_NAME.py"
Expand Down Expand Up @@ -170,7 +170,11 @@ gecho "Using default PYNQ board $PYNQ_BOARD"

# Ensure git-based deps are checked out at correct commit
if [ "$FINN_SKIP_DEP_REPOS" = "0" ]; then
# Need to ensure this is done within the finn/ root folder:
OLD_PWD=$(pwd)
cd $SCRIPTPATH
./fetch-repos.sh
cd $OLD_PWD
fi

# Build the FINN Docker image
Expand All @@ -184,7 +188,7 @@ fi
# Launch container with current directory mounted
# important to pass the --init flag here for correct Vivado operation, see:
# https://stackoverflow.com/questions/55733058/vivado-synthesis-hangs-in-docker-container-spawned-by-jenkins
DOCKER_EXEC="docker run -t --rm $DOCKER_INTERACTIVE --tty --init "
DOCKER_EXEC="docker run --rm $DOCKER_INTERACTIVE --init " # --tty --init "
DOCKER_EXEC+="--hostname $DOCKER_INST_NAME "
DOCKER_EXEC+="-e SHELL=/bin/bash "
DOCKER_EXEC+="-w $SCRIPTPATH "
Expand Down

0 comments on commit a208cd1

Please sign in to comment.