Skip to content

Commit e8ec9f5

Browse files
committed
Merge branch 'main' into audio-classification-with-no-mic
2 parents 8774a48 + 3b0658f commit e8ec9f5

9 files changed

Lines changed: 584 additions & 6 deletions

File tree

containers/ei-models-runner/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ RUN set -ex; \
1010
groupadd -g 29 audio || true; \
1111
groupadd -g 991 render || true; \
1212
groupadd -g 1000 arduino || true; \
13-
useradd -u 1000 -g arduino -G audio,video,render -ms /bin/bash arduino;
13+
useradd -u 1000 -g arduino -G audio,video,render -ms /bin/bash arduino
1414

1515
# Add all EI OOTB models to the container with specific ownership
1616
COPY --chown=arduino:arduino ./models/ei-ootb-models/arm64/* /models/ootb/ei/
17+
COPY --chown=arduino:arduino ./src/start-runner.sh /home/arduino/start-runner.sh
1718

18-
USER arduino
19-
20-
WORKDIR /app
19+
RUN chmod +x /home/arduino/start-runner.sh
2120

21+
WORKDIR /home/arduino
2222
ENV HOME=/home/arduino
23+
24+
USER arduino
2325
ENV USER=arduino
2426

25-
ENTRYPOINT ["node", "/app/linux/node/build/cli/linux/runner.js"]
27+
ENTRYPOINT ["/home/arduino/start-runner.sh"]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: Copyright (C) ARDUINO SRL (http://www.arduino.cc)
4+
#
5+
# SPDX-License-Identifier: MPL-2.0
6+
7+
NODE_COMMAND=("node" "/app/linux/node/build/cli/linux/runner.js" "$@")
8+
9+
trap_signal() {
10+
echo "Caught signal $1. Exiting wrapper immediately..."
11+
exit 0
12+
}
13+
14+
trap 'trap_signal TERM' TERM
15+
trap 'trap_signal INT' INT
16+
17+
while true; do
18+
echo "🚀 Starting EI inference runner..."
19+
20+
"${NODE_COMMAND[@]}"
21+
22+
EXIT_CODE=$?
23+
24+
# Check the exit code
25+
if [ $EXIT_CODE -eq 0 ]; then
26+
echo "✅ Application exited successfully (Exit Code: 0). Stopping restart loop."
27+
break
28+
else
29+
echo "⚠️ Application exited with error (Exit Code: $EXIT_CODE). Restarting in 1 seconds..."
30+
sleep 1
31+
fi
32+
done

src/arduino/app_bricks/streamlit_ui/addons.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def arduino_header(title: str):
3131
3232
Additionally, custom components like `st.arduino_header()` are provided to streamline Arduino integration.
3333
"""
34-
svg_path = os.path.join(os.path.dirname(__file__), "assets", "RGB-Arduino-Logo_Color Inline Loop.svg")
34+
svg_path = os.path.join(os.path.dirname(__file__), "assets", "RGB-Arduino-Logo-Color-Inline-Loop.svg")
3535
svg_path = os.path.abspath(svg_path)
3636
try:
3737
with open(svg_path, "r", encoding="utf-8") as f:

src/arduino/app_bricks/streamlit_ui/assets/RGB-Arduino-Logo_Color Inline Loop.svg renamed to src/arduino/app_bricks/streamlit_ui/assets/RGB-Arduino-Logo-Color-Inline-Loop.svg

File renamed without changes.

src/arduino/app_bricks/streamlit_ui/assets/RGB-Arduino-Logo_Color Inline Loop.svg.license renamed to src/arduino/app_bricks/streamlit_ui/assets/RGB-Arduino-Logo-Color-Inline-Loop.svg.license

File renamed without changes.

src/arduino/app_utils/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
from .image import *
1212
from .jsonparser import *
1313
from .logger import *
14+
from .ledmatrix import *
1415
from .slidingwindowbuffer import *
1516
from .userinput import *
17+
from .leds import *
1618

1719
__all__ = [
1820
"App",
@@ -22,6 +24,8 @@
2224
"call",
2325
"provide",
2426
"FolderWatcher",
27+
"Frame",
28+
"FrameDesigner",
2529
"HttpClient",
2630
"draw_bounding_boxes",
2731
"get_image_bytes",
@@ -31,4 +35,5 @@
3135
"SineGenerator",
3236
"SlidingWindowBuffer",
3337
"UserTextInput",
38+
"Leds",
3439
]

0 commit comments

Comments
 (0)