Skip to content

Commit

Permalink
refactor: adjust gst profile DockerImage accordingly with the input s…
Browse files Browse the repository at this point in the history
…ource if RealSense or not

Signed-off-by: Jim Wang <[email protected]>
  • Loading branch information
jim-wang-intel committed Nov 13, 2023
1 parent e46cf46 commit 2d88338
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions run-ovms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ then
TAG=$CONTAINER_IMAGE_OVERRIDE
fi

gstDockerImages="dlstreamer:dev"
re='^[0-9]+$'
if grep -q "video" <<< "$INPUTSRC"; then
echo "assume video device..."
Expand All @@ -47,10 +48,19 @@ elif [[ "$INPUTSRC" =~ $re ]]; then
echo "assume realsense device..."
cameras=`ls /dev/vid* | while read line; do echo "--device=$line"; done`
TARGET_GPU_DEVICE=$TARGET_GPU_DEVICE" "$cameras
gstDockerImages="dlstreamer:realsense"
else
echo "$INPUTSRC"
fi
if [ "$PIPELINE_PROFILE" == "gst" ]
then
# modify gst profile DockerImage accordingly based on the inputsrc is RealSense camera or not
docker run --rm -v "${PWD}":/workdir mikefarah/yq -i e '.OvmsClient.DockerLauncher.DockerImage |= "'"$gstDockerImages"'"' \
/workdir/configs/opencv-ovms/cmd_client/res/gst/configuration.yaml
fi
#pipeline script is configured from configuration.yaml in opencv-ovms/cmd_client/res folder
# Set RENDER_MODE=1 for demo purposes only
Expand Down

0 comments on commit 2d88338

Please sign in to comment.