AT SOME POINT THE DEFAULT IMAGE STARTING COMING WITH PYTHON3
I'm leaving all this here as a historical artifact mainly. At some point the default image started shipping with Python3. As of July 23, 2023 it's Python 3.9.2. That's a hair out of date, but not horribly so. I won't be updating the image referenced below any longer. It's not worth the time to me for a slightly newer version of Python3.
Two things to note. If you want to install any Python modules, you'll have to install pip3 by doing:
No need for sudo, as the image seems to default to the root user. If you ever update the image, you need to reinstall pip3, but ONLY if you need to install modules again.
Which leads me to the other trick. If youmap the Python userspace to an external volume and then install modules in the userspace, you can avoid having to reinstall your python modules every time you update the image. To do that, you need to add a line to your Docker run or compose:
Then install Python modules using:
ORIGINAL POST
For anyone who wants to run NPVR5 from a Docker container and also would like to use Python scripts for things like Parallel or Post Processing (or Extra tuners), I've published a Docker container based on nextpvr/nextpvr_amd64table. There are two different ways you can run this Docker.
The stable tag includes NextPVR, Python 3.9.6, and the following modules:
These are included so two Python scripts I wrote (trigger.kodiscan and iguana-blaster) will work properly in a NextPVR docker container.
The pub tag includes NextPVR and Python 3.9.6. It is setup so that you can map a directory to user level python module installs and install them outside the Docker container. This provides more flexibility if you want to install other modules but don't want to have to redo it every time the image is updated.
Both tags also includes NTP and a couple options to set the timezone for your container. This was added because on certain platforms Docker containers don't seem to be able to get the time/timezone from the host OS. And having accurate times seems important for a DVR. If your Docker container is getting the time correctly from the Host OS, you don't need to include those options.
There's complete information both options (including sample run commands) at:
https://hub.docker.com/repository/docker...vr-python3
NOTE ABOUT COMSKIP:
With the release of 6.x, the NextPVR image is based on Bullseye. I can't seem to get any of the current(ish) Comskips to build with this, and the version of Comskip included in the apt package manager for Bullseye is pretty old. So I DID NOT update the two Comskip tags. They will remain at the last 5.x version of NextPVR, but may not ever be updated again.
I'm leaving all this here as a historical artifact mainly. At some point the default image started shipping with Python3. As of July 23, 2023 it's Python 3.9.2. That's a hair out of date, but not horribly so. I won't be updating the image referenced below any longer. It's not worth the time to me for a slightly newer version of Python3.
Two things to note. If you want to install any Python modules, you'll have to install pip3 by doing:
Code:
apt update
apt install python3-pip
No need for sudo, as the image seems to default to the root user. If you ever update the image, you need to reinstall pip3, but ONLY if you need to install modules again.
Which leads me to the other trick. If youmap the Python userspace to an external volume and then install modules in the userspace, you can avoid having to reinstall your python modules every time you update the image. To do that, you need to add a line to your Docker run or compose:
Code:
- '/volume1/configs/nextpvr/local:/root/.local'
Then install Python modules using:
Code:
pip install --user <item>
ORIGINAL POST
For anyone who wants to run NPVR5 from a Docker container and also would like to use Python scripts for things like Parallel or Post Processing (or Extra tuners), I've published a Docker container based on nextpvr/nextpvr_amd64table. There are two different ways you can run this Docker.
The stable tag includes NextPVR, Python 3.9.6, and the following modules:
- requests
- xmltodict
- websocket-client
- opencv-python
These are included so two Python scripts I wrote (trigger.kodiscan and iguana-blaster) will work properly in a NextPVR docker container.
The pub tag includes NextPVR and Python 3.9.6. It is setup so that you can map a directory to user level python module installs and install them outside the Docker container. This provides more flexibility if you want to install other modules but don't want to have to redo it every time the image is updated.
Both tags also includes NTP and a couple options to set the timezone for your container. This was added because on certain platforms Docker containers don't seem to be able to get the time/timezone from the host OS. And having accurate times seems important for a DVR. If your Docker container is getting the time correctly from the Host OS, you don't need to include those options.
There's complete information both options (including sample run commands) at:
https://hub.docker.com/repository/docker...vr-python3
NOTE ABOUT COMSKIP:
With the release of 6.x, the NextPVR image is based on Bullseye. I can't seem to get any of the current(ish) Comskips to build with this, and the version of Comskip included in the apt package manager for Bullseye is pretty old. So I DID NOT update the two Comskip tags. They will remain at the last 5.x version of NextPVR, but may not ever be updated again.