From 1f8572452ba2d12508d315057aadc67b3af29a3a Mon Sep 17 00:00:00 2001 From: Matthew Hansen <12618239+mkhansenbot@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:38:34 +0000 Subject: [PATCH] Remove rocker - fix issue #146 --- moveit2/run.sh | 9 ++------- nav2_demo/run.sh | 9 ++------- navigation2/run.sh | 10 ++-------- space_robots/run.sh | 9 ++------- spaceros/README.md | 3 +-- spaceros/run.sh | 10 ++-------- 6 files changed, 11 insertions(+), 39 deletions(-) diff --git a/moveit2/run.sh b/moveit2/run.sh index 0d35d60..9381852 100755 --- a/moveit2/run.sh +++ b/moveit2/run.sh @@ -4,18 +4,13 @@ # Requires: # docker # an X server -# rocker - - -ROCKER_ARGS="--devices /dev/dri/ --dev-helpers --x11 --user-override-name spaceros-user --network host" IMG_NAME=openrobotics/moveit2 # Replace `/` with `_` to comply with docker container naming # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" -ROCKER_ARGS="${ROCKER_ARGS} --name $CONTAINER_NAME" -echo "Using image <$IMG_NAME> to start container <$CONTAINER_NAME>" # Start the container -rocker ${ROCKER_ARGS} $IMG_NAME +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME diff --git a/nav2_demo/run.sh b/nav2_demo/run.sh index c0a6438..d596ffc 100755 --- a/nav2_demo/run.sh +++ b/nav2_demo/run.sh @@ -4,18 +4,13 @@ # Requires: # docker # an X server -# rocker - - -ROCKER_ARGS="--devices /dev/dri/ --dev-helpers --x11 --user-override-name spaceros-user --network host" IMG_NAME=osrf/space_nav2_demo # Replace `/` with `_` to comply with docker container naming # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" -ROCKER_ARGS="${ROCKER_ARGS} --name $CONTAINER_NAME" -echo "Using image <$IMG_NAME> to start container <$CONTAINER_NAME>" # Start the container -rocker ${ROCKER_ARGS} $IMG_NAME +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME diff --git a/navigation2/run.sh b/navigation2/run.sh index e1c9884..77377f6 100755 --- a/navigation2/run.sh +++ b/navigation2/run.sh @@ -4,18 +4,12 @@ # Requires: # docker # an X server -# rocker - - -ROCKER_ARGS="--devices /dev/dri/ --dev-helpers --x11 --user-override-name spaceros-user --network host" IMG_NAME=osrf/space_nav2 - # Replace `/` with `_` to comply with docker container naming # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" -ROCKER_ARGS="${ROCKER_ARGS} --name $CONTAINER_NAME" -echo "Using image <$IMG_NAME> to start container <$CONTAINER_NAME>" # Start the container -rocker ${ROCKER_ARGS} $IMG_NAME +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME diff --git a/space_robots/run.sh b/space_robots/run.sh index 9a3b739..39c9993 100755 --- a/space_robots/run.sh +++ b/space_robots/run.sh @@ -4,18 +4,13 @@ # Requires: # docker # an X server -# rocker - - -ROCKER_ARGS="--devices /dev/dri/ --dev-helpers --x11 --user-override-name spaceros-user --network host" IMG_NAME=openrobotics/space_robots_demo # Replace `/` with `_` to comply with docker container naming # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" -ROCKER_ARGS="${ROCKER_ARGS} --name $CONTAINER_NAME" -echo "Using image <$IMG_NAME> to start container <$CONTAINER_NAME>" # Start the container -rocker ${ROCKER_ARGS} $IMG_NAME +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME diff --git a/spaceros/README.md b/spaceros/README.md index 109d132..c572e6d 100644 --- a/spaceros/README.md +++ b/spaceros/README.md @@ -1,7 +1,7 @@ # Space ROS Docker Image and Earthly configuration The Earthfile configuration in this directory facilitates builds of Space ROS from source code. -The generated container image is based on Ubuntu 22.04 (Jammy) and can be used with [`rocker`](https://github.com/osrf/rocker) to add X11 and GPU passthrough. +The generated container image is based on Ubuntu 22.04 (Jammy) ## Building the Docker Image @@ -42,7 +42,6 @@ ubuntu jammy a8780b506fa4 5 days ago The new image is named **osrf/space-ros:latest**. -The `rocker` library is required to run the built image, install it by `sudo apt-get install python3-rocker`. There is a run.sh script provided for convenience that will run the spaceros image in a container. ```bash diff --git a/spaceros/run.sh b/spaceros/run.sh index d4a311c..7b6845c 100755 --- a/spaceros/run.sh +++ b/spaceros/run.sh @@ -4,18 +4,12 @@ # Requires: # docker # an X server -# rocker - - -ROCKER_ARGS="--devices /dev/dri/ --dev-helpers --x11 --user-override-name spaceros-user --network host" IMG_NAME=osrf/space-ros - # Replace `/` with `_` to comply with docker container naming # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" -ROCKER_ARGS="${ROCKER_ARGS} --name $CONTAINER_NAME" -echo "Using image <$IMG_NAME> to start container <$CONTAINER_NAME>" # Start the container -rocker ${ROCKER_ARGS} $IMG_NAME +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME