TheAlly commited on
Commit
1c7ee64
·
1 Parent(s): 930ecb7

Initial BirdNET server setup

Browse files
Files changed (3) hide show
  1. Dockerfile +18 -0
  2. README.md +8 -6
  3. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # System libs BirdNET-Analyzer needs for audio decoding
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ffmpeg libsndfile1 && \
6
+ rm -rf /var/lib/apt/lists/*
7
+
8
+ # HF Spaces requires non-root user
9
+ RUN useradd -m -u 1000 user
10
+ USER user
11
+ ENV PATH="/home/user/.local/bin:$PATH"
12
+
13
+ WORKDIR /home/user/app
14
+ COPY --chown=user:user requirements.txt .
15
+ RUN pip install --no-cache-dir --user -r requirements.txt
16
+
17
+ EXPOSE 7860
18
+ CMD ["python", "-m", "birdnet_analyzer.server", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -1,11 +1,13 @@
1
  ---
2
- title: SS BirdNet
3
- emoji: 🌍
4
  colorFrom: green
5
- colorTo: indigo
6
  sdk: docker
7
- pinned: false
8
- short_description: BirdNet Audio Analysis API
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
1
  ---
2
+ title: SS BirdNet API
3
+ emoji: 🐦
4
  colorFrom: green
5
+ colorTo: yellow
6
  sdk: docker
7
+ app_port: 7860
 
8
  ---
9
 
10
+ # SS BirdNet API
11
+
12
+ BirdNET-Analyzer wrapped as an HTTP endpoint via its built-in `birdnet_analyzer.server` module. POST multipart audio to the analyze endpoint and get species predictions as JSON.
13
+
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ birdnet-analyzer