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

[Docker] mount Brevitas from host for easier co-dev

parent a8f91178
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,9 @@ ARG PYTHON_VERSION=3.6
WORKDIR /workspace
RUN git clone https://github.com/maltanar/brevitas_cnv_lfc.git
RUN git clone --branch feature/finn_onnx_export https://github.com/Xilinx/brevitas
RUN cd brevitas; pip install .
# Assume brevitas is cloned on host and mounted, see below.
#RUN git clone --branch feature/finn_onnx_export https://github.com/Xilinx/brevitas
#RUN cd brevitas; pip install .
COPY requirements.txt .
RUN pip install -r requirements.txt
......@@ -15,4 +16,8 @@ RUN rm requirements.txt
# Note that we expect the cloned finn directory on the host to be
# mounted on /workspace/finn -- see run-docker.sh for an example
# of how to do this.
ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src:/workspace/brevitas_cnv_lfc/training_scripts"
ENV PYTHONPATH "${PYTHONPATH}:/workspace/finn/src"
ENV PYTHONPATH "${PYTHONPATH}:/workspace/brevitas_cnv_lfc/training_scripts"
# And this branch assumes the same for brevitas for easier co-development.
ENTRYPOINT pip install -e /workspace/brevitas && /bin/bash
......@@ -5,7 +5,11 @@ SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
echo "Mounting $SCRIPTPATH into /workspace/finn"
echo "Mounting $SCRIPTPATH/../brevitas into /workspace/brevitas"
# Build the FINN Docker image
docker build --tag=finn .
# Launch container with current directory mounted
docker run --rm --name finn_dev -it -v $SCRIPTPATH:/workspace/finn finn bash
docker run --rm --name finn_dev -it \
-v $SCRIPTPATH:/workspace/finn \
-v $SCRIPTPATH/../brevitas:/workspace/brevitas \
finn bash
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