Merge branch 'dev'

This commit is contained in:
Samuel Ortion 2022-08-25 13:34:56 +02:00
commit 85c92cee06
5 changed files with 52 additions and 41 deletions

View File

@ -2,24 +2,6 @@
This guide allow you to install BirdNET-stream step by step on your debian based system.
For a one-liner installation, you can use the following command:
```bash
curl -sL https://raw.githubusercontent.com/UncleSamulus/BirdNET-stream/main/install.sh | bash
```
For debug purposes, you can use the following command, it will log the installation steps to the console:
```bash
DEBUG=1 ./install.sh
```
If you need to use a specific branch (e.g. dev), you can use the following command:
```bash
BRANCH=dev ./install.sh
```
## Requirements
- git

View File

@ -42,7 +42,7 @@ On debian based systems (tested on Debian Bullseye), the following command shoul
# Change to your installation directory here, /home/$USER/Documents/BirdNET-stream for instance, or /opt/birdnet-stream, or whatever
cd /path/to/installation/directory
# Download installation script
curl -0 https://raw.githubusercontent.com/UncleSamulus/BirdNET-stream/main/install.sh
curl -O https://raw.githubusercontent.com/UncleSamulus/BirdNET-stream/main/install.sh
# Run installation script:
chmod +x ./install.sh
./install.sh

View File

@ -1,19 +1,19 @@
version: '3.9'
services:
# recording:
# container_name: birdnet_recording
# build:
# context: .
# dockerfile: ./docker/recording/Dockerfile
# restart: unless-stopped
# environment:
# - CHUNK_FOLDER=${CHUNK_FOLDER:-/media/birdnet/records}
# volumes:
# - ${RECORDS_DIR:-/media/birdnet/records}:${RECORS_FOLDER:-/media/birdnet/records}
# # Allow container to access to the hosts microphone
# devices:
# - /dev/snd:/dev/snd
recording:
container_name: birdnet_recording
build:
context: .
dockerfile: ./docker/recording/Dockerfile
restart: unless-stopped
volumes:
- birdnet_app:${PROJECT_ROOT:-/opt/birdnet}
- birdnet_records:${RECORDS_DIR:-/media/birdnet/records}
# Allow container to access to the hosts microphone
devices:
- /dev/snd:/dev/snd
# analyzer:
# container_name: birdnet_analyzer
# build:

View File

@ -11,15 +11,9 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y \
--no-install-recommends \
libasound2 \
alsa-utils \
libsndfile1-dev \
&& apt-get install -y ffmpeg \
ffmpeg \
&& apt-get clean
RUN mkdir -p /opt/birdnet/
WORKDIR /opt/birdnet/
COPY config ./config
COPY daemon/birdnet_recording.sh /usr/local/bin/birdnet_recording.sh
WORKDIR /opt/birdnet
ENTRYPOINT ["/usr/local/bin/birdnet_recording.sh"]
ENTRYPOINT ["./daemon/birdnet_recording.sh"]

View File

@ -0,0 +1,35 @@
#! /usr/bin/env bash
# Extract observations from a model output folder
#
set -e
# set -x
DEBUG=${DEBUG:-1}
debug() {
[[ $DEBUG -eq 1 ]] && echo "$@"
}
if [[ -f ./config/birdnet.conf ]]; then
source ./config/birdnet.conf
else
debug "./config/birdnet.conf does not exist"
exit 1
fi
if [[ ! -d ${CHUNK_FOLDER} ]]; then
debug "CHUNK_FOLDER ${CHUNK_FOLDER} does not exist"
exit 1
fi
model_outputs() {
ls ${CHUNK_FOLDER}/out/*/model.out.csv
}
main() {
# # Remove all junk observations
# ./daemon/birdnet_clean.sh
# Get model outputs
for model_output in $(model_outputs); do
./daemon/birdnet_output_to_sql.sh "$model_output"
done
}
main