Replies: 6 comments 6 replies
-
First pass at a working analysis server docker container: https://github.com/srd424/birdnetpi-docker/pkgs/container/bnpi-server Command line to run would look like something like:
As ever I'm now "testing this in prod" again on my live server :) |
Beta Was this translation helpful? Give feedback.
-
I've managed to improve these containers to use a shared layer containing most of the pip packages that are common between the analysis server and the rest of site:
Manually built at the moment: Next steps probably:
|
Beta Was this translation helpful? Give feedback.
-
I've updated the mainline modularized packages to populate the 'state' directory if required, including creating an empty database, and generating a default config file (with the GeoIP stuff re-enabled to get an approximate lat/lon.) Hopefully this is getting to the point where it might actually be genuinely useful and relatively easy to use now. Current TODO list:
|
Beta Was this translation helpful? Give feedback.
-
Have had a first shot at pulling the streamlit stuff out into a separate container: https://github.com/srd424/birdnetpi-docker/pkgs/container/bnpi-site-streamlit I fiddled with the main site container so you can pass in the streamlit host/port by setting environment variable
I haven't really made any attempt to re-optimize the layers to take this into account yet, so there's probably some space that can be shared/saved between the different images, once I can face another round of staring in confusion at screens full of pip dependency trees :) |
Beta Was this translation helpful? Give feedback.
-
I've pushed a new version with an extra shared layer that saves ~200MB if you have all three images installed - total size is now about 1.2GB I think which doesn't seem too bad. Any further significant improvements will probably involve doing terrible things inserting custom layers with |
Beta Was this translation helpful? Give feedback.
-
I updated the README, hopefully now it consolidates everything I've said here and makes it reasonably obvious how to use the modularized images: |
Beta Was this translation helpful? Give feedback.
-
Just to let every know, in addition to playing around generating a docker image, I've done the early beginnings of some work on 'modularizing':
https://github.com/srd424/BirdNET-Pi/tree/modules
I know other people have gone down the road of full rewrites, etc., but realistically I have limited time / energy so I'm keeping it simple. I also think it's easier to 'trust' a smaller set of changes to the codebase.
I guess this would eventually form the basis for generating a number of small(er) docker images for different components. The source code itself is pretty small so there seems no point in splitting it up, therefore I've just focused on dependencies (debs and pip packages) for the moment, and only enabling the appropriate services.
The idea is you define
MODULES_ENABLED
at install time either inbirdnet.conf
orbirdnet.conf.override
. Currently recognised modules areserver
for the analysis server,main
for basically everything else, andlocal_recording
which pulls in pulseaudio which is otherwise omitted to save space.The modules branch also includes some changes to
server.py
to allow it to handle requests from multiple different 'sites'. This is a bit rudimentary at the moment, you need to bind mount each site's "state" directory on/home/pi/sites/<sitename>
, and it's recordings directory on/home/pi/BirdSongs/<sitename>
, and it doesn't yet look at the site-specific version of include/exclude lists etc. This also needs some tiny changes to the client which I was thinking of putting into a PR as they're simple, don't really affect anything, and would save me carrying the changes..Anyway, I've probably got this to the state where this is usable for my own needs (feeding audio from relatives houses to be centrally processed and hosted), I thought I'd make a public post linking to the state of play just in case I don't get time to take it further!
Beta Was this translation helpful? Give feedback.
All reactions