Good morning,
For once, this is not a question: after a few hurdles, I managed to install MPF inside a docker container, while still taking advantage of the host X server to display content (such as the DMD), on a Jetson devkit (in my case a Jetson AGX Xavier, but should apply to any Jetson). It is not rocket science, as MPF essentially install a bunch of Python components for which there are very few HW dependencies
I choosed Jetson because I know how to make X forwarding work, and I know I can benefit from all GPU acceleration (especially multimedia codecs) from within the container (although that remains to be tested)
In principle, the same should apply as well to any other Linux distro, although your mileage may vary depending on dependencies and container runtime capabilities
This has a lot of benefits, the major ones being;
- low power consumption: a Jetson Nano is 10W, a Jetson Xavier NX is 15W
- low mechanical foot print: about two credit cards side by side
- full support for multimedia capabilities: any Jetson product can run multiple h264/h265 decoding sessions, probably more actually than what you would ever need for a pinball machine
- compositing : you can also take advantage of the GPU for advanced layering techniques
Note however that the last two have not been tested, as I'm clueless on MPF so need to start digging into it :-) Next step is to connect a PIN2DMD to the Jetson (so will likely need to add a device passthrough to the container).
Also, if you are familiar with containers, in principle I should set machine folders as a volume on the host, and mount it to the container so that data is persistent, and almost all steps below should be defined as a dockercompose file, but I'm lazy this afternoon :-)
So without further ado, here are the steps to install:
# Install BSP (through SD card on devkit, or through SDK Manager on production module or third party systems)
# Install docker runtime through SDK manager or with command line below
sudo apt install nvidia-docker2
sudo systemctl restart docker
# Run the next steps on the Jetson itself
# Install base L4T_container from
ngc.nvidia.comsudo docker pull
nvcr.io/nvidia/l4t-base:r32.7.1# Create container
xhost +
sudo docker run -it --name=mpf_l4t --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix
nvcr.io/nvidia/l4t-base:r34.1# connect to container console (once command is run, following commands are executed from within the container)
sudo docker attach mpf_l4t
# all following steps are run INSIDE the container
# Install build components and dependencies
apt update
apt install build-essential
apt install git
apt install ca-certificates
apt install libavdevice-dev
apt install libavfilter-dev
# clone git and build
cd ~
git clone
https://github.com/missionpinball/mpf-debian-installer.gitcd mpf-debian-install
./install
cd ~
git clone
https://github.com/missionpinball/mpf-examplescd demo_man
# Note on DISPLAY variable - on my setup, using Teamviewer, I have to set DISPLAY=:1
export DISPLAY=:1
mpf both -X
# To exit test application, hit Ctl-C
# To disconnect from container, hit Ctl-P then Ctl-Q