My project is a copy of the simple-server-python repo, I’ve added the install of omxplayer, and I have a folder in my project called
./videos that gets but into
# base-image for python on any machine using a template variable,
# see more about dockerfile templates here: https://www.balena.io/docs/learn/develop/dockerfile/
# use `install_packages` if you need to install dependencies,
# for instance if you need git, just uncomment the line below.
RUN install_packages git omxplayer
COPY ./videos /home/pi/videos
# Set our working directory
# Copy requirements.txt first for better cache on later pushes
COPY requirements.txt requirements.txt
# pip install python deps from requirements.txt on the resin.io build server
RUN pip install -r requirements.txt
# This will copy all files in our root to the working directory in the container
COPY . ./
# Enable udevd so that plugged dynamic hardware devices show up in our container.
# main.py will run when container starts up on the device
To test if omxplayer works I then ssh in and run
omxplayer --display=5 /home/pi/videos/default.mp4.