This commit is contained in:
Alexandre
2024-04-27 11:40:38 +02:00
parent 3953d70526
commit 786e01d4a1
2 changed files with 10 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ ENV DEBIAN_FRONTEND="noninteractive" \
XDG_RUNTIME_DIR="/run/user/1000" \ XDG_RUNTIME_DIR="/run/user/1000" \
PYTHON_VIRTUAL_ENV="/home/pi/BirdNET-Pi/birdnet/bin/python3" PYTHON_VIRTUAL_ENV="/home/pi/BirdNET-Pi/birdnet/bin/python3"
# hadolint ignore=DL3015,SC2016,DL3004 # hadolint ignore=DL3015,SC2016
RUN \ RUN \
# Install dependencies # Install dependencies
echo "Install dependencies" && \ echo "Install dependencies" && \
@@ -42,14 +42,14 @@ RUN \
# Change user to pi and create /home/pi # Change user to pi and create /home/pi
echo "setting users" && \ echo "setting users" && \
groupmod -o -g 101 abc && usermod -o -u 101 abc && \ groupmod -o -g 101 abc && usermod -o -u 101 abc && \
groupadd --non-unique -g 1000 "$USER" && \ groupadd --non-unique -g 1000 pi && \
useradd --non-unique --uid 1000 --gid 1000 -m "$USER" && \ useradd --non-unique --uid 1000 --gid 1000 -m pi && \
\ \
# Ensure permissions # Ensure permissions
echo "setting permissions" && \ echo "setting permissions" && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ echo "pi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
mkdir -p "$HOME"/.config/matplotlib && \ mkdir -p /home/pi/.config/matplotlib && \
chown -R 1000:1000 "$HOME" && \ chown -R 1000:1000 /home/pi && \
\ \
# Download installer # Download installer
curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \ curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \
@@ -66,7 +66,7 @@ RUN \
# Disable pulseaudio # Disable pulseaudio
echo 'for file in $(grep -srl "pulseaudio --start" $HOME/BirdNET-Pi/scripts); do sed -i "/pulseaudio --start/d" "$file"; done' >> /newinstallermod.sh && \ echo 'for file in $(grep -srl "pulseaudio --start" $HOME/BirdNET-Pi/scripts); do sed -i "/pulseaudio --start/d" "$file"; done' >> /newinstallermod.sh && \
# Set permission # Set permission
chmod 777 /newinstallermod.sh && \ chmod +x /newinstallermod.sh && \
\ \
# Modify installer # Modify installer
################## ##################
@@ -84,8 +84,8 @@ RUN \
\ \
# Adapt for lsio usage of /app # Adapt for lsio usage of /app
if [ -d /app ]; then rm -r /app; fi && \ if [ -d /app ]; then rm -r /app; fi && \
ln -s "$HOME" /app && \ ln -s /home/pi /app && \
chown -R 1000:1000 "$HOME" /app chown -R 1000:1000 /home/pi /app
################## ##################
# 2 Modify Image # # 2 Modify Image #

View File

@@ -95,7 +95,7 @@
"slug": "birdnet-pi", "slug": "birdnet-pi",
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi", "url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
"usb": true, "usb": true,
"version": "1.2", "version": "1.3",
"video": true, "video": true,
"webui": "[PROTO:ssl]://[HOST]:[PORT:80]" "webui": "[PROTO:ssl]://[HOST]:[PORT:80]"
} }