Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ if [ -n "$DISPLAY" ]; then
DISPLAY_DEVICE=" -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix "
fi

# check for event based devices
EVENT_DEVICES=""

for i in {0..9}
do
if [ -a "/dev/input/event$i" ]; then
EVENT_DEVICES="$EVENT_DEVICES --device /dev/input/event$i "
fi
done

# print configuration
print_var()
{
Expand All @@ -193,6 +203,7 @@ print_var "USER_VOLUME"
print_var "USER_COMMAND"
print_var "V4L2_DEVICES"
print_var "DISPLAY_DEVICE"
print_var "EVENT_DEVICES"

# run the container
if [ $ARCH = "aarch64" ]; then
Expand All @@ -208,7 +219,7 @@ if [ $ARCH = "aarch64" ]; then
-v /tmp/nv_jetson_model:/tmp/nv_jetson_model \
$DISPLAY_DEVICE $V4L2_DEVICES \
$DATA_VOLUME $USER_VOLUME $DEV_VOLUME \
$CONTAINER_IMAGE $USER_COMMAND
$EVENT_DEVICES $CONTAINER_IMAGE $USER_COMMAND

elif [ $ARCH = "x86_64" ]; then

Expand All @@ -220,7 +231,7 @@ elif [ $ARCH = "x86_64" ]; then
-e NVIDIA_DRIVER_CAPABILITIES=all \
$DISPLAY_DEVICE $V4L2_DEVICES \
$DATA_VOLUME $USER_VOLUME $DEV_VOLUME \
$CONTAINER_IMAGE $USER_COMMAND
$EVENT_DEVICES $CONTAINER_IMAGE $USER_COMMAND

fi