Running FPGA overlays within docker container

Hi,

I’m trying to run PYNQ within a Docker Container on an Ultra96-V2 board with PYNQ 2.7, but I haven’t found any working procedure.
I’ve seen on the Docker, Xilinx Platforms & PYNQ topic that It’s possible to get it done, but the mantainers haven’t released docker files for this yet.

Can anyone share any working procedure to load overlays within docker containers?

Advices are also appreciated,
Thanks in advance.

Hi @rubenlesmes - what have you tried so far?

If you have a dockerfile and docker commandline call, maybe we can start from there.

Hi @schelleg - Using a basic Ubuntu docker image:

FROM ubuntu:20.04

RUN apt-get update -y && apt-get upgrade -y && \
    apt-get install software-properties-common -y && \
    add-apt-repository ppa:deadsnakes/ppa && \
    apt-get install -y python3.8 python3-pip

RUN apt-get install -y libdrm-dev

RUN python3 -m pip install pynq

CMD ['bash']

The docker build process (docker build -t pynq .) runs into the following error:

g++ -fPIC -I/usr/include/libdrm -c -g -std=c++11 displayport.cpp
displayport.cpp:19:10: fatal error: boost/scope_exit.hpp: No such file or directory
  19 | #include <boost/scope_exit.hpp>
     |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Thanks for the support.

Looks like you need boost inside the container … in pynq, we install these packages:related to boost on lines 46-48:

I’d suggest trying to add boost libraries to your apt get list and go from there…

Adding boost libraries got me a little further but still, ran into another error:

  _xhdmi/hdmi_functions.c:5:10: fatal error: libxlnk_cma.h: No such file or directory
      5 | #include <libxlnk_cma.h>
        |          ^~~~~~~~~~~~~~~
  compilation terminated.
  make[1]: *** [embeddedsw_lib.mk:35: _xhdmi/libxhdmi.so] Error 1
  make[1]: Leaving directory '/tmp/pip-install-lwgsvukk/pynq/pynq/lib/_pynq'
  make: *** [Makefile:7: all] Error 2
  make: Leaving directory '/tmp/pip-install-lwgsvukk/pynq/pynq/lib/_pynq/_xhdmi'
  error: command 'make' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for pynq
1 Like

Looks like PYNQ isn’t on the underlying OS perhaps? Or not mapped into the container?

If you look at our Kria-PYNQ install, you’ll see other pynq packages we install to make the image (or in this case, the container) PYNQ ready

If you look at the shell script, you’ll see other PYNQ software get installed

Installing the PYNQ Allocator from the Kria installation solved the issue of installing pynq.

Thanks!!

1 Like

hi @rubenlesmes - do you have a dockerfile or bash script that is successful for you?

I think lots of people could benefit from your work if you can share it with a minimal writeup