fix(camera): expose Jetson VI capture devices to container
This commit is contained in:
@@ -15,7 +15,14 @@ done
|
|||||||
test -f "$MODULE_PATH/install/setup.bash" || { echo 'Module is not built' >&2; exit 1; }
|
test -f "$MODULE_PATH/install/setup.bash" || { echo 'Module is not built' >&2; exit 1; }
|
||||||
|
|
||||||
docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true
|
docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true
|
||||||
exec docker run --rm -d --device "$DEVICE:$DEVICE" --network host --ipc=host \
|
device_args=(--device "$DEVICE:$DEVICE")
|
||||||
|
# Jetson VI capture opens additional channel devices from the container.
|
||||||
|
for capture_device in /dev/capture-vi-channel*; do
|
||||||
|
if [ -c "$capture_device" ]; then
|
||||||
|
device_args+=(--device "$capture_device:$capture_device")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exec docker run --rm -d "${device_args[@]}" --network host --ipc=host \
|
||||||
--name "$CONTAINER_NAME" \
|
--name "$CONTAINER_NAME" \
|
||||||
-e "ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-77}" \
|
-e "ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-77}" \
|
||||||
-e "ROS_LOCALHOST_ONLY=${ROS_LOCALHOST_ONLY:-0}" \
|
-e "ROS_LOCALHOST_ONLY=${ROS_LOCALHOST_ONLY:-0}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user