Why not just install all the python 3 dependencies to a docker image and then run the docker container on the pi?
Hardware control on the Pi is pretty simple, use the WiringPi library. I guess you'd need to run Docker in privileged mode, but it should work from within a container?