Docker container to build

I spent (rather wasted :grinning:) several hours trying to build the VisionV2 repos using Ubuntu 22.04 LTS. Failed steps and even the built version had a few issues running on the board.
I read in the docs that only 18.04 and 20.04 are mentioned. I built a docker container to build the repo and it was a seamless experience.

Sharing the repo for others who may find it useful.

Github repo for building docker container to support building VisionV2 artifacts

Thanks

Venkat

2 Likes

i think this is similar maybe: GitHub - kng/visionfive2-docker: Docker build environment for VisionFive 2 SBC - via: VisionFive 2 Debian Image Released - #79 by knegge

2 Likes

Ubuntu are not regularly producing containers for riscv at this time.
They produced a few containers in November last year as a test so you could potentially use these, note there is no bionic aka 18.04 you could use focal aka 20.04.
As these are 10 months old there could potentially be a security problem with them.

  • ubuntu:focal-20220922
  • ubuntu:jammy-20221003
  • ubuntu:kinetic-20220922

If you want to run things in docker on your board you can always use the x86_64 container in an emulator.
To do this you need to install the qemu binfmt driver inside docker to allow you to run docker containers for x86_64, arm etc.

docker run --name binfmt --privileged tonistiigi/binfmt:qemu-v6.1.0 --install all

you can then add a --platform linux/amd64 to run the docker command line to use the x86_64 container.

1 Like

Thanks for the tip

Thanks for the pointer. I had not seen it. But the approaches are different I would say. I went for a minimal but ease of host integration and simple make step not as elaborate as the other approach which looks to be very detailed.