Skip to content
Snippets Groups Projects
Commit aa21bd7b authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Docker] allow setting host build dir with FINN_HOST_BUILD_DIR

parent 30d92075
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ These are summarized below:
* ``PYNQ_IP`` and ``PYNQ_PORT`` (or ``ALVEO_IP`` and ``ALVEO_PORT``) specify ip address and port number to access the PYNQ board / Alveo target
* ``PYNQ_USERNAME`` and ``PYNQ_PASSWORD`` (or ``ALVEO_USERNAME`` and ``ALVEO_PASSWORD``) specify the PYNQ board / Alveo host access credentials for the test suite. For PYNQ, password is always needed to run as sudo. For Alveo, you can leave the password empty and place your ssh private key in the ``finn/ssh_keys`` folder to use keypair authentication.
* ``PYNQ_TARGET_DIR`` (or ``ALVEO_TARGET_DIR``) specifies the target dir on the PYNQ board / Alveo host for the test suite
* (optional) ``FINN_HOST_BUILD_DIR`` specifies which directory on the host will be used as the build directory. Defaults to ``/tmp/finn_dev_<username>``
Supported Hardware
===================
......
......@@ -95,18 +95,18 @@ SCRIPTPATH=$(dirname "$SCRIPT")
: ${ALVEO_TARGET_DIR="/tmp"}
: ${XILINX_XRT="/opt/xilinx/xrt"}
: ${PLATFORM_REPO_PATHS="/opt/xilinx/platforms"}
: ${FINN_HOST_BUILD_DIR="/tmp/$DOCKER_INST_NAME"}
BUILD_LOCAL=/tmp/$DOCKER_INST_NAME
FINN_CONTAINER_BUILD_DIR=/tmp/$DOCKER_INST_NAME
VIVADO_HLS_LOCAL=$VIVADO_PATH
VIVADO_IP_CACHE=$BUILD_LOCAL/vivado_ip_cache
VIVADO_IP_CACHE=$FINN_CONTAINER_BUILD_DIR/vivado_ip_cache
# ensure build dir exists locally
mkdir -p $BUILD_LOCAL
mkdir -p $VIVADO_IP_CACHE
mkdir -p $FINN_HOST_BUILD_DIR
mkdir -p $FINN_SSH_KEY_DIR
gecho "Instance is named as $DOCKER_INST_NAME"
gecho "Mounting $BUILD_LOCAL into $BUILD_LOCAL"
gecho "Mounting $FINN_HOST_BUILD_DIR into $FINN_CONTAINER_BUILD_DIR"
gecho "Mounting $VIVADO_PATH into $VIVADO_PATH"
gecho "Mounting $VITIS_PATH into $VITIS_PATH"
gecho "Port-forwarding for Jupyter $JUPYTER_PORT:$JUPYTER_PORT"
......@@ -148,7 +148,7 @@ DOCKER_EXEC="docker run -t --rm --name $DOCKER_INST_NAME $DOCKER_INTERACTIVE --i
DOCKER_EXEC+="--hostname $DOCKER_INST_NAME "
DOCKER_EXEC+="-e SHELL=/bin/bash "
DOCKER_EXEC+="-v $SCRIPTPATH:/workspace/finn "
DOCKER_EXEC+="-v $BUILD_LOCAL:$BUILD_LOCAL "
DOCKER_EXEC+="-v $FINN_HOST_BUILD_DIR:$FINN_CONTAINER_BUILD_DIR "
DOCKER_EXEC+="-v $FINN_SSH_KEY_DIR:/home/$DOCKER_UNAME/.ssh "
DOCKER_EXEC+="-e FINN_INST_NAME=$DOCKER_INST_NAME "
DOCKER_EXEC+="-e FINN_ROOT="/workspace/finn" "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment