Skip to content

Commit 356528f

Browse files
committed
[Deps] Introduce env var to skip xrt download
1 parent 8d6543c commit 356528f

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.github/workflows/quicktest-dev-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ jobs:
2222
export FINN_ROOT=$(pwd)
2323
export FINN_BUILD_DIR=/tmp/finn_gha
2424
export FINN_INST_NAME=finn_gha
25+
export FINN_SKIP_XRT_DOWNLOAD=1
2526
./run-docker.sh quicktest

docker/Dockerfile.finn

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ FROM ubuntu:jammy-20230126
3131
LABEL maintainer="Jakoba Petri-Koenig <[email protected]>, Yaman Umuroglu <[email protected]>"
3232

3333
ARG XRT_DEB_VERSION="xrt_202220.2.14.354_22.04-amd64-xrt"
34+
ARG SKIP_XRT
3435

3536
WORKDIR /workspace
3637

@@ -78,9 +79,10 @@ RUN cd verilator && \
7879
make install
7980

8081
# install XRT
81-
RUN wget -U 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17' "https://www.amd.com/bin/public/amdOpenDownload?filename=$XRT_DEB_VERSION.deb" -O /tmp/$XRT_DEB_VERSION.deb --debug
82-
RUN apt install -y /tmp/$XRT_DEB_VERSION.deb
83-
RUN rm /tmp/$XRT_DEB_VERSION.deb
82+
RUN if [ -z "$SKIP_XRT" ];then \
83+
wget -U 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17' "https://www.amd.com/bin/public/amdOpenDownload?filename=$XRT_DEB_VERSION.deb" -O /tmp/$XRT_DEB_VERSION.deb --debug && \
84+
apt install -y /tmp/$XRT_DEB_VERSION.deb && \
85+
rm /tmp/$XRT_DEB_VERSION.deb; fi
8486

8587
# versioned Python package requirements for FINN compiler
8688
# these are given in requirements.txt

docker/finn_entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if [ -f "$VITIS_PATH/settings64.sh" ];then
8686
source $XILINX_XRT/setup.sh
8787
gecho "Found XRT at $XILINX_XRT"
8888
else
89-
recho "XRT not found on $XILINX_XRT, did the installation fail?"
89+
recho "XRT not found on $XILINX_XRT, did you skip the download or did the installation fail?"
9090
exit -1
9191
fi
9292
else

run-docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ SCRIPTPATH=$(dirname "$SCRIPT")
100100
: ${NVIDIA_VISIBLE_DEVICES=""}
101101
: ${DOCKER_BUILDKIT="1"}
102102
: ${FINN_SINGULARITY=""}
103+
: ${FINN_SKIP_XRT_DOWNLOAD=""}
103104

104105
DOCKER_INTERACTIVE=""
105106

@@ -186,7 +187,7 @@ if [ "$FINN_DOCKER_PREBUILT" = "0" ] && [ -z "$FINN_SINGULARITY" ]; then
186187
# Need to ensure this is done within the finn/ root folder:
187188
OLD_PWD=$(pwd)
188189
cd $SCRIPTPATH
189-
docker build -f docker/Dockerfile.finn --build-arg XRT_DEB_VERSION=$XRT_DEB_VERSION --tag=$FINN_DOCKER_TAG $FINN_DOCKER_BUILD_EXTRA .
190+
docker build -f docker/Dockerfile.finn --build-arg XRT_DEB_VERSION=$XRT_DEB_VERSION --build-arg SKIP_XRT=$FINN_SKIP_XRT_DOWNLOAD --tag=$FINN_DOCKER_TAG $FINN_DOCKER_BUILD_EXTRA .
190191
cd $OLD_PWD
191192
fi
192193
# Launch container with current directory mounted

0 commit comments

Comments
 (0)