2626# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
29- FROM pytorch/pytorch:1.1.0-cuda10 .0-cudnn7.5-devel
30- MAINTAINER Yaman Umuroglu <yamanu@xilinx.com>
29+ FROM pytorch/pytorch:1.7.1-cuda11 .0-cudnn8-runtime
30+ LABEL maintainer=" Yaman Umuroglu <yamanu@xilinx.com>"
3131ARG GID
3232ARG GNAME
3333ARG UNAME
@@ -36,11 +36,28 @@ ARG PASSWD
3636
3737WORKDIR /workspace
3838
39+ # some Vitis deps require a timezone to be specified, which hangs in Docker
40+ # use workaround from https://grigorkh.medium.com/fix-tzdata-hangs-docker-image-build-cdb52cc3360d
41+ ENV TZ="Europe/Dublin"
42+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
43+
44+
3945RUN apt-get update
4046RUN apt-get -y upgrade
41- RUN apt-get install -y build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev
42- RUN apt-get install -y verilator nano zsh rsync
43- RUN apt-get -y install sshpass wget unzip
47+ RUN apt-get install -y build-essential
48+ RUN apt-get install -y libglib2.0-0
49+ RUN apt-get install -y libsm6
50+ RUN apt-get install -y libxext6
51+ RUN apt-get install -y libxrender-dev
52+ RUN apt-get install -y verilator
53+ RUN apt-get install -y nano
54+ RUN apt-get install -y zsh
55+ RUN apt-get install -y rsync
56+ RUN apt-get install -y git
57+ RUN apt-get install -y sshpass
58+ RUN apt-get install -y wget
59+ RUN apt-get install -y unzip
60+ RUN apt-get install -y zip
4461RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
4562
4663COPY requirements.txt .
@@ -54,22 +71,29 @@ RUN pip install sphinx==3.1.2
5471RUN pip install sphinx_rtd_theme==0.5.0
5572RUN pip install pytest-xdist==2.0.0
5673RUN pip install pytest-parallel==0.1.0
57- RUN pip install netron
74+ RUN pip install netron>=4.7.9
75+ RUN pip install pandas==1.1.5
76+ RUN pip install scikit-learn==0.24.1
77+ RUN pip install tqdm==4.31.1
5878RUN pip install -e git+https://github.com/fbcotter/dataset_loading.git@0.0.4#egg=dataset_loading
5979
80+
6081# switch user
6182RUN groupadd -g $GID $GNAME
6283RUN useradd -M -u $UID $UNAME -g $GNAME
6384RUN usermod -aG sudo $UNAME
6485RUN echo "$UNAME:$PASSWD" | chpasswd
6586RUN echo "root:$PASSWD" | chpasswd
87+ RUN chown -R $UNAME:$GNAME /workspace
6688RUN ln -s /workspace /home/$UNAME
67- RUN chown -R $UNAME:$GNAME /home/$UNAME
6889USER $UNAME
6990
91+
7092# cloning dependency repos (as user)
7193# finn-base
7294RUN git clone https://github.com/Xilinx/finn-base.git /workspace/finn-base
95+ # finn-experimental
96+ RUN git clone https://github.com/Xilinx/finn-experimental.git /workspace/finn-experimental
7397# Brevitas
7498RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
7599# CNPY
@@ -98,12 +122,11 @@ RUN chmod 755 /usr/local/bin/finn_entrypoint.sh
98122RUN chmod 755 /usr/local/bin/quicktest.sh
99123# install vitis deps if required
100124ARG INSTALL_XRT_DEPS
125+ ARG XRT_DEB_VERSION
101126RUN if [ "$INSTALL_XRT_DEPS" = "1" ] ; then \
102- echo "Installing XRT dependencies"; \
103- wget https://raw.githubusercontent.com/Xilinx/XRT/master/src/runtime_src/tools/scripts/xrtdeps.sh; \
104- apt-get update; \
105- bash xrtdeps.sh -docker; \
106- rm xrtdeps.sh; \
127+ echo "Installing XRT: $XRT_DEB_VERSION"; \
128+ wget https://www.xilinx.com/bin/public/openDownload?filename=$XRT_DEB_VERSION.deb -O /tmp/$XRT_DEB_VERSION.deb; \
129+ apt install -y /tmp/$XRT_DEB_VERSION.deb; \
107130 else \
108131 echo "Skipping installation of XRT dependencies"; \
109132 fi
0 commit comments