From aa003b8766028695317c286baa7e5e23dd7b4ea8 Mon Sep 17 00:00:00 2001 From: dirksavage88 Date: Fri, 9 Aug 2024 14:25:30 -0400 Subject: [PATCH] implement hardware rendering (fixes #159) Signed-off-by: dirksavage88 --- space_robots/Dockerfile | 4 ++-- space_robots/run.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/space_robots/Dockerfile b/space_robots/Dockerfile index 561802c..2a7b389 100644 --- a/space_robots/Dockerfile +++ b/space_robots/Dockerfile @@ -48,7 +48,7 @@ ARG DEBIAN_FRONTEND=noninteractive # the cache won't make it into the built image but will be maintained between steps. RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator + sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator libgl1-mesa-glx libgl1-mesa-dri # TODO(anyone): remove demo-pkgs.txt, no packages left after exclusions # Generate repos file for demo dependencies, excluding packages from Space ROS core. @@ -83,7 +83,7 @@ RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCM # Get the source for the dependencies # RUN vcs import src < /tmp/demo_generated_pkgs.repos COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ -RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' +RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ diff --git a/space_robots/run.sh b/space_robots/run.sh index 39c9993..1d4c358 100755 --- a/space_robots/run.sh +++ b/space_robots/run.sh @@ -13,4 +13,6 @@ CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" # Start the container docker run --rm -it --name $CONTAINER_NAME --network host \ + --volume=/tmp/.X11-unix:/tmp/.X11-unix\ + --device=/dev/dri:/dev/dri \ -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME