Skip to content

Commit c6b63d3

Browse files
committed
switch backend to Vitis
1 parent 5d297f1 commit c6b63d3

14 files changed

+10780
-267
lines changed

docker/Dockerfile.vitis

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM jupyter/tensorflow-notebook:tensorflow-2.11.1
2+
3+
# Install prequisites
4+
USER root
5+
RUN apt-get update -y && \
6+
apt-get install --no-install-recommends -y \
7+
curl \
8+
libtinfo5 \
9+
libc6-dev-i386 \
10+
net-tools \
11+
graphviz \
12+
make \
13+
unzip \
14+
g++ \
15+
xvfb \
16+
git \
17+
libncursesw5 \
18+
libc6-dev-i386 && \
19+
apt-get clean && \
20+
rm -rf /var/lib/apt/lists/*
21+
22+
# Install Vitis 2024.1
23+
COPY docker/vitis_cfg.txt /tmp/vitis_cfg.txt
24+
COPY docker/install_vitis.sh /tmp/install_vitis.sh
25+
RUN source /tmp/install_vitis.sh && rm /tmp/install_vitis.sh
26+
27+
# Install hls4ml and dependencies
28+
USER ${NB_USER}
29+
RUN mamba install -y -c conda-forge \
30+
graphviz==7.1.0 \
31+
pydot==1.4.2 \
32+
tensorflow-datasets==4.8.3 \
33+
jupyter-book==0.15.1 \
34+
jupyter_contrib_nbextensions==0.7.0
35+
RUN pip install \
36+
hls4ml[profiling]==0.8.0 \
37+
qkeras==0.9.0 \
38+
conifer==0.2b0 \
39+
pysr==0.16.3
40+
USER root
41+
RUN mamba clean --all -f -y && \
42+
mamba list && \
43+
fix-permissions "${CONDA_DIR}" && \
44+
fix-permissions "/home/${NB_USER}"
45+
46+
LABEL org.opencontainers.image.source https://github.com/fastmachinelearning/hls4ml-tutorial
47+
48+
# ENV XILINX_VIVADO /opt/Xilinx/Vitis_HLS/2024.1
49+
COPY docker/start-notebook.sh /usr/local/bin/

docker/install_vitis.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
function main() {
4+
# Install Vivado; to speed up build, download files from local webserver
5+
# See: https://stackoverflow.com/questions/26692708/how-to-add-a-file-to-an-image-in-dockerfile-without-using-the-add-or-copy-direct
6+
cd /tmp/
7+
curl http://10.164.29.48:8000//FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023.tar.gz?dl=1 -L -o FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023.tar.gz
8+
# curl http://169.228.130.58:8000/vivado.tar.gz -o vivado.tar.gz
9+
tar -xzf FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023.tar.gz --no-same-owner
10+
cd FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023
11+
./xsetup -a XilinxEULA,3rdPartyEULA -b Install -c /tmp/vitis_cfg.txt
12+
./installLibs.sh
13+
cd ..
14+
rm -rf FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023
15+
rm FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023.tar.gz
16+
rm /tmp/vitis_cfg.txt
17+
ls -lah /opt/Xilinx/
18+
19+
# Install the pynq-z2 board files
20+
curl https://www.dropbox.com/s/meufyrhgcg38i12/pynq-z2.zip?dl=1 -L -o pynq-z2.zip
21+
# curl http://169.228.130.58:8000/pynq-z2.zip -o pynq-z2.zip
22+
unzip pynq-z2.zip
23+
rm pynq-z2.zip
24+
mv pynq-z2 /opt/Xilinx/Vitis_HLS/2024.1/data/boards/board_files/
25+
}
26+
27+
main "$@" || exit 1

docker/start-notebook.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
set -e
66

7-
# setup vivado 2019.2
8-
source /opt/Xilinx/Vivado/2019.2/settings64.sh
7+
# setup vivado 2024.1
8+
source /opt/Xilinx/Vitis_HLS/2024.1/settings64.sh
99

1010
# The Jupyter command to launch
1111
# JupyterLab by default

docker/vitis_cfg.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#### Vitis Unified Software Platform Install Configuration ####
2+
Edition=Vitis Unified Software Platform
3+
4+
Product=Vitis
5+
6+
# Path where AMD FPGAs & Adaptive SoCs software will be installed.
7+
Destination=/opt/Xilinx/
8+
9+
# Choose the Products/Devices the you would like to install.
10+
Modules=SoCs:0,Versal AI Core Series ES1:0,Engineering Sample Devices for Custom Platforms:0,Versal ACAP:0,Vitis IP Cache (Enable faster on-boarding for new users):0,Versal HBM Series ES1:0,Versal AI Edge Series ES1:0,Versal Prime Series ES1:0,Versal Premium Series ES1:0,Power Design Manager (PDM):0,UltraScale+:0,Vitis Networking P4:0,Vitis Unified Software Platform:0,Devices for Custom Platforms:0,DocNav:0,Virtex UltraScale+ HBM ES:0
11+
12+
# Choose the post install scripts you'd like to run as part of the finalization step. Please note that some of these scripts may require user interaction during runtime.
13+
InstallOptions=
14+
15+
## Shortcuts and File associations ##
16+
# Choose whether Start menu/Application menu shortcuts will be created or not.
17+
CreateProgramGroupShortcuts=1
18+
19+
# Choose the name of the Start menu/Application menu shortcut. This setting will be ignored if you choose NOT to create shortcuts.
20+
ProgramGroupFolder=Xilinx Design Tools
21+
22+
# Choose whether shortcuts will be created for All users or just the Current user. Shortcuts can be created for all users only if you run the installer as administrator.
23+
CreateShortcutsForAllUsers=0
24+
25+
# Choose whether shortcuts will be created on the desktop or not.
26+
CreateDesktopShortcuts=1
27+
28+
# Choose whether file associations will be created or not.
29+
CreateFileAssociation=1
30+
31+
# Choose whether disk usage will be optimized (reduced) after installation
32+
EnableDiskUsageOptimization=1
33+

0 commit comments

Comments
 (0)