59 lines
2.7 KiB
Diff
59 lines
2.7 KiB
Diff
From: David Escalona <david.escalona@digi.com>
|
|
Date: Mon, 16 Sep 2024 18:48:10 +0200
|
|
Subject: [PATCH 1/4] semantic-segmentation: remove weston user check from
|
|
launch
|
|
|
|
Signed-off-by: David Escalona <david.escalona@digi.com>
|
|
---
|
|
.../files/stai-mpu/launch_python_semantic_segmentation.sh | 8 +-------
|
|
.../launch_python_semantic_segmentation_testdata.sh | 8 +-------
|
|
2 files changed, 2 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/stai-mpu/launch_python_semantic_segmentation.sh b/stai-mpu/launch_python_semantic_segmentation.sh
|
|
index a1c2479..94cd540 100755
|
|
--- a/stai-mpu/launch_python_semantic_segmentation.sh
|
|
+++ b/stai-mpu/launch_python_semantic_segmentation.sh
|
|
@@ -5,17 +5,11 @@
|
|
#
|
|
# This software is licensed under terms that can be found in the LICENSE file
|
|
# in the root directory of this software component.
|
|
# If no LICENSE file comes with this software, it is provided AS-IS.
|
|
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
FRAMEWORK=$1
|
|
echo "stai-mpu wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board_npu.sh
|
|
cmd="python3 /usr/local/x-linux-ai/semantic-segmentation/stai_mpu_semantic_segmentation.py -m /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_MODEL -l /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_LABEL.txt --framerate $DFPS --frame_width $DWIDTH --frame_height $DHEIGHT $OPTIONS"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
+$cmd
|
|
diff --git a/stai-mpu/launch_python_semantic_segmentation_testdata.sh b/stai-mpu/launch_python_semantic_segmentation_testdata.sh
|
|
index bf3ac5e..a02de8f 100755
|
|
--- a/stai-mpu/launch_python_semantic_segmentation_testdata.sh
|
|
+++ b/stai-mpu/launch_python_semantic_segmentation_testdata.sh
|
|
@@ -5,17 +5,11 @@
|
|
#
|
|
# This software is licensed under terms that can be found in the LICENSE file
|
|
# in the root directory of this software component.
|
|
# If no LICENSE file comes with this software, it is provided AS-IS.
|
|
|
|
-weston_user=$(ps aux | grep '/usr/bin/weston '|grep -v 'grep'|awk '{print $1}')
|
|
FRAMEWORK=$1
|
|
echo "stai-mpu wrapper used : "$FRAMEWORK
|
|
source /usr/local/x-linux-ai/resources/config_board_npu.sh
|
|
cmd="python3 /usr/local/x-linux-ai/semantic-segmentation/stai_mpu_semantic_segmentation.py -m /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_MODEL -l /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_LABEL.txt -i /usr/local/x-linux-ai/semantic-segmentation/models/$SEMANTIC_SEGMENTATION_DATA"
|
|
|
|
-if [ "$weston_user" != "root" ]; then
|
|
- echo "user : "$weston_user
|
|
- script -qc "su -l $weston_user -c '$cmd'"
|
|
-else
|
|
- $cmd
|
|
-fi
|
|
\ No newline at end of file
|
|
+$cmd
|