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

Merge branch 'dev' into feature/cnv_w1a1_decoupled

parents 716cd98a 79d3e878
No related branches found
No related tags found
No related merge requests found
...@@ -43,30 +43,19 @@ RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config ...@@ -43,30 +43,19 @@ RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
# cloning dependency repos # cloning dependency repos
# Brevitas # Brevitas
RUN git clone --branch feature/finn_onnx_export https://github.com/Xilinx/brevitas.git /workspace/brevitas RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
RUN git -C /workspace/brevitas checkout 215cf44c76d562339fca368c8c3afee3110033e8
# Brevitas examples # Brevitas examples
RUN git clone --branch feature/rework_scaling_clipping https://github.com/maltanar/brevitas_cnv_lfc.git /workspace/brevitas_cnv_lfc RUN git clone https://github.com/maltanar/brevitas_cnv_lfc.git /workspace/brevitas_cnv_lfc
RUN git -C /workspace/brevitas_cnv_lfc checkout 2059f96bd576bf71f32c757e7f92617a70190c90
# CNPY # CNPY
RUN git clone https://github.com/rogersce/cnpy.git /workspace/cnpy RUN git clone https://github.com/rogersce/cnpy.git /workspace/cnpy
RUN git -C /workspace/cnpy checkout 4e8810b1a8637695171ed346ce68f6984e585ef4
# FINN hlslib # FINN hlslib
RUN git clone https://github.com/maltanar/finn-hlslib.git /workspace/finn-hlslib RUN git clone https://github.com/maltanar/finn-hlslib.git /workspace/finn-hlslib
RUN git -C /workspace/finn-hlslib checkout b139bf051ac8f8e0a3625509247f714127cf3317
# PyVerilator # PyVerilator
RUN git clone https://github.com/maltanar/pyverilator /workspace/pyverilator RUN git clone https://github.com/maltanar/pyverilator /workspace/pyverilator
RUN git -C /workspace/pyverilator checkout 307fc5c82db748620836307a2002fdc9fe170226
# PYNQ-HelloWorld # PYNQ-HelloWorld
RUN git clone https://github.com/maltanar/PYNQ-HelloWorld.git /workspace/PYNQ-HelloWorld RUN git clone https://github.com/maltanar/PYNQ-HelloWorld.git /workspace/PYNQ-HelloWorld
RUN git -C /workspace/PYNQ-HelloWorld checkout 0c82a61b0ec1a07fa275a14146233824ded7a13d
# FINN # checkout desired FINN branch for testing
RUN git clone --branch $FINN_CI_BRANCH https://github.com/Xilinx/finn /workspace/finn RUN git clone --branch $FINN_CI_BRANCH https://github.com/Xilinx/finn /workspace/finn
RUN pip install -r /workspace/finn/requirements.txt RUN pip install -r /workspace/finn/requirements.txt
......
...@@ -60,10 +60,6 @@ RUN pip install pytest-dependency ...@@ -60,10 +60,6 @@ RUN pip install pytest-dependency
RUN pip install sphinx RUN pip install sphinx
RUN pip install sphinx_rtd_theme RUN pip install sphinx_rtd_theme
# copy entrypoint script
COPY docker/finn_entrypoint.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/finn_entrypoint.sh
# switch user # switch user
RUN groupadd -g $GID $GNAME RUN groupadd -g $GID $GNAME
RUN useradd -M -u $UID $UNAME -g $GNAME RUN useradd -M -u $UID $UNAME -g $GNAME
...@@ -76,32 +72,20 @@ USER $UNAME ...@@ -76,32 +72,20 @@ USER $UNAME
# cloning dependency repos (as user) # cloning dependency repos (as user)
# Brevitas # Brevitas
RUN git clone --branch feature/finn_onnx_export https://github.com/Xilinx/brevitas.git /workspace/brevitas RUN git clone https://github.com/Xilinx/brevitas.git /workspace/brevitas
RUN git -C /workspace/brevitas checkout 215cf44c76d562339fca368c8c3afee3110033e8
# Brevitas examples # Brevitas examples
RUN git clone --branch feature/rework_scaling_clipping https://github.com/maltanar/brevitas_cnv_lfc.git /workspace/brevitas_cnv_lfc RUN git clone https://github.com/maltanar/brevitas_cnv_lfc.git /workspace/brevitas_cnv_lfc
RUN git -C /workspace/brevitas_cnv_lfc checkout 2059f96bd576bf71f32c757e7f92617a70190c90
# CNPY # CNPY
RUN git clone https://github.com/rogersce/cnpy.git /workspace/cnpy RUN git clone https://github.com/rogersce/cnpy.git /workspace/cnpy
RUN git -C /workspace/cnpy checkout 4e8810b1a8637695171ed346ce68f6984e585ef4
# FINN hlslib # FINN hlslib
RUN git clone https://github.com/maltanar/finn-hlslib.git /workspace/finn-hlslib RUN git clone https://github.com/maltanar/finn-hlslib.git /workspace/finn-hlslib
RUN git -C /workspace/finn-hlslib checkout b139bf051ac8f8e0a3625509247f714127cf3317
# PyVerilator # PyVerilator
RUN git clone https://github.com/maltanar/pyverilator /workspace/pyverilator RUN git clone https://github.com/maltanar/pyverilator /workspace/pyverilator
RUN git -C /workspace/pyverilator checkout 307fc5c82db748620836307a2002fdc9fe170226
# PYNQ-HelloWorld # PYNQ-HelloWorld
RUN git clone https://github.com/maltanar/PYNQ-HelloWorld.git /workspace/PYNQ-HelloWorld RUN git clone https://github.com/maltanar/PYNQ-HelloWorld.git /workspace/PYNQ-HelloWorld
RUN git -C /workspace/PYNQ-HelloWorld checkout 0c82a61b0ec1a07fa275a14146233824ded7a13d
# Note that we expect the cloned finn directory on the host to be # for this developer-oriented Docker container we assume the FINN repo is cloned and mounted from the host
# mounted on /workspace/finn -- see run-docker.sh for an example # at /workspace/finn -- see run-docker.sh for an example of how to do this.
# of how to do this.
ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src" ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src"
ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas_cnv_lfc/training_scripts" ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas_cnv_lfc/training_scripts"
ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas" ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas"
...@@ -110,6 +94,13 @@ ENV PYNQSHELL_PATH "/workspace/PYNQ-HelloWorld/boards" ...@@ -110,6 +94,13 @@ ENV PYNQSHELL_PATH "/workspace/PYNQ-HelloWorld/boards"
WORKDIR /home/$UNAME/finn WORKDIR /home/$UNAME/finn
RUN echo "PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '" >> /home/$UNAME/.bashrc RUN echo "PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '" >> /home/$UNAME/.bashrc
RUN echo "source \$VIVADO_PATH/settings64.sh" >> /home/$UNAME/.bashrc
# copy entrypoint script
USER root
COPY docker/finn_entrypoint.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/finn_entrypoint.sh
USER $UNAME
ENTRYPOINT ["finn_entrypoint.sh"] ENTRYPOINT ["finn_entrypoint.sh"]
CMD ["bash"] CMD ["bash"]
...@@ -4,6 +4,43 @@ export XILINX_VIVADO=$VIVADO_PATH ...@@ -4,6 +4,43 @@ export XILINX_VIVADO=$VIVADO_PATH
export SHELL=/bin/bash export SHELL=/bin/bash
export FINN_ROOT=/workspace/finn export FINN_ROOT=/workspace/finn
GREEN='\033[0;32m'
NC='\033[0m' # No Color
gecho () {
echo -e "${GREEN}$1${NC}"
}
# checkout the correct dependency repo commits
# the repos themselves are cloned in the Dockerfile
BREVITAS_COMMIT=215cf44c76d562339fca368c8c3afee3110033e8
BREVITAS_EXAMPLES_COMMIT=2059f96bd576bf71f32c757e7f92617a70190c90
CNPY_COMMIT=4e8810b1a8637695171ed346ce68f6984e585ef4
HLSLIB_COMMIT=b139bf051ac8f8e0a3625509247f714127cf3317
PYVERILATOR_COMMIT=307fc5c82db748620836307a2002fdc9fe170226
PYNQSHELL_COMMIT=0c82a61b0ec1a07fa275a14146233824ded7a13d
gecho "Setting up known-good commit versions for FINN dependencies"
# Brevitas
gecho "brevitas @ $BREVITAS_COMMIT"
git -C /workspace/brevitas checkout $BREVITAS_COMMIT --quiet
# Brevitas examples
gecho "brevitas_cnv_lfc @ $BREVITAS_EXAMPLES_COMMIT"
git -C /workspace/brevitas_cnv_lfc checkout $BREVITAS_EXAMPLES_COMMIT --quiet
# CNPY
gecho "cnpy @ $CNPY_COMMIT"
git -C /workspace/cnpy checkout $CNPY_COMMIT --quiet
# FINN hlslib
gecho "finn-hlslib @ $HLSLIB_COMMIT"
git -C /workspace/finn-hlslib checkout $HLSLIB_COMMIT --quiet
# PyVerilator
gecho "PyVerilator @ $PYVERILATOR_COMMIT"
git -C /workspace/pyverilator checkout $PYVERILATOR_COMMIT --quiet
# PYNQ-HelloWorld
gecho "PYNQ shell @ $PYNQSHELL_COMMIT"
git -C /workspace/PYNQ-HelloWorld checkout $PYNQSHELL_COMMIT --quiet
# source Vivado env.vars # source Vivado env.vars
source $VIVADO_PATH/settings64.sh source $VIVADO_PATH/settings64.sh
......
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