NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
1 2 3 4 5 6 Next »
AMD64 based Docker Image with Python3

 
  • 0 Vote(s) - 0 Average
AMD64 based Docker Image with Python3
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#1
2020-01-25, 05:45 PM (This post was last modified: 2022-09-05, 02:59 PM by pkscout.)
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_amd64Confusedtable.  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.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 44,961
Threads: 862
Joined: May 2006
#2
2020-01-25, 05:52 PM
I made this suggestion to take it from the host https://forums.nextpvr.com/showthread.ph...#pid532506 but your suggestion might be better on a Windows host.

Martin
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#3
2020-01-25, 08:42 PM
(2020-01-25, 05:52 PM)mvallevand Wrote: I made this suggestion to take it from the host https://forums.nextpvr.com/showthread.ph...#pid532506 but your suggestion might be better on a Windows host.

Martin

I wish I could take credit for this, but I found the answer from some internet search at some point, and I now I can't find the original page again to give the author the credit.  Bad me.  But yes, this solution does appear to be platform independent.  The drawback is that you have to know the right timezone text to put in.  Which is also findable on the internet, so I guess there's that.  '-)
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#4
2020-02-09, 12:55 AM
Image has been updated to NextPVR 5.0.1.200209.
dsreyn
Offline

Member

USA
Posts: 66
Threads: 13
Joined: Jan 2020
#5
2020-02-13, 11:36 PM
I'm not sure what you've been doing to inject Python into the container. But I'm wondering if it would be possible to build it in such a way that it could exist in a separate directory structure outside the container's file system, and then be mounted into the docker file system using the --volume option. As I recall, the Python configure scripts usually have a --prefix=[dir] option that can be used to set the install directory to something other than the standard / default location. Then when you get to the "make install" step, everything gets installed under the directory given by --prefix.

The advantage would be that your distribution would then just need to be the subdirectory structure where Python gets installed, not the full container. And you wouldn't need to put together a new distribution every time Sub puts out a new release. Users would just have the Python package unpacked somewhere outside the container, and would just point the new NextPVR release to that location.

Doug
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#6
2020-02-14, 02:21 AM
I'm just using apt-get to install the Python stuff. It takes like 5 extra minutes to build a new container when sub releases one. And the advantage there is that I then get the most current Python builds at the same time. Your suggestion could certainly work, but I'd probably spend quite a lot of time figuring it out, and then I'd have to do at again whenever a Python update comes out.
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#7
2020-03-21, 08:49 PM
Image has been updated to NextPVR v5.0.2.200322. In addition, there is a tagged stable branch now (to match what sub is doing). Instructions in first post have been updated.
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#8
2020-03-22, 04:32 AM (This post was last modified: 2020-03-22, 04:33 AM by pkscout.)
On the off chance anyone is actually using this, I found a problem with the python3 cv2 module.  The stable branch has been updated with the fixes, so if you pulled it between now and 7 hours ago, you need to pull an updated image.
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#9
2020-04-28, 03:32 AM
Image has been updated to NextPVR v5.0.4.200428.
pkscout
Offline

Senior Member

USA
Posts: 430
Threads: 48
Joined: May 2014
#10
2020-07-27, 12:20 AM
Image has been updated to NextPVR 5.0.7.200726.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
Information Custom NPVR image with ffmpeg, ccextractor, handbrake, comskip, etc. Ranbato 45 4,612 2022-11-07, 02:41 PM
Last Post: Ranbato
  Change docker user Deihmos 5 201 2022-10-25, 05:06 PM
Last Post: mvallevand
  NextPVR in Unraid Docker is writing recordings with 755 permissions antenna 4 541 2022-09-24, 12:20 AM
Last Post: greg in kansas
  NextPVR in Docker on Synology not finding 'epg.xml' huntercj 3 275 2022-09-04, 08:10 AM
Last Post: huntercj
  Mygica D692 + Docker stevil 1 282 2022-06-12, 06:11 AM
Last Post: sub
  NPVR Synology Docker with Octopus SAT/IP finds no channels Thoschi 90 5,593 2022-05-21, 06:22 AM
Last Post: sylvio2000
  Migrate recordings from Windows to Docker ewiemann 9 1,259 2021-10-16, 07:52 PM
Last Post: cncb
  Docker system requirements guidelines janoonk 22 2,812 2021-09-21, 08:16 PM
Last Post: tsanga
  Docker Install Showing Version Version: 5.1.1.210328 pkscout 3 910 2021-05-06, 04:12 PM
Last Post: sub
  Device not showing in Synology docker irrits 4 1,080 2021-04-18, 07:24 AM
Last Post: irrits

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode