From d66e45acbc9c634fc2e263d51bd634bf0307e298 Mon Sep 17 00:00:00 2001 From: Ezra Brooks Date: Thu, 28 Dec 2023 12:47:36 -0700 Subject: [PATCH] Don't run vcs inside buildkit (#60) --- moveit2/Dockerfile | 16 +++------------- moveit2/build.sh | 3 +++ .../{moveit2_tutorials.repos => moveit2.repos} | 4 ++++ moveit2/src/moveit2 | 1 + moveit2/src/moveit_task_constructor | 1 + moveit2/src/moveit_visual_tools | 1 + moveit2/src/rosparam_shortcuts | 1 + moveit2/src/rviz_visual_tools | 1 + space_robots/Dockerfile | 5 ----- space_robots/build.sh | 3 +++ 10 files changed, 18 insertions(+), 18 deletions(-) rename moveit2/{moveit2_tutorials.repos => moveit2.repos} (83%) create mode 160000 moveit2/src/moveit2 create mode 160000 moveit2/src/moveit_task_constructor create mode 160000 moveit2/src/moveit_visual_tools create mode 160000 moveit2/src/rosparam_shortcuts create mode 160000 moveit2/src/rviz_visual_tools diff --git a/moveit2/Dockerfile b/moveit2/Dockerfile index 6181fd8..811a986 100644 --- a/moveit2/Dockerfile +++ b/moveit2/Dockerfile @@ -81,20 +81,11 @@ RUN python3 -m pip install -U \ pytest-rerunfailures \ pytest -# Get the MoveIt2 source code -WORKDIR ${HOME_DIR} -RUN sudo git clone https://github.com/ros-planning/moveit2.git -b ${ROSDISTRO} moveit2/src -RUN cd ${MOVEIT2_DIR}/src \ - && sudo git clone https://github.com/ros-planning/moveit2_tutorials.git -b ${ROSDISTRO} - -# Update the ownership of the source files (had to use sudo above to work around -# a possible inherited 'insteadof' from the host that forces use of ssh -RUN sudo chown -R ${USERNAME}:${USERNAME} ${MOVEIT2_DIR} - # Get rosinstall_generator RUN sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator # Generate repos file for moveit2 dependencies, excluding packages from Space ROS core. +WORKDIR ${HOME_DIR} COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/ COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ RUN rosinstall_generator \ @@ -107,9 +98,8 @@ RUN rosinstall_generator \ # Get the repositories required by MoveIt2, but not included in Space ROS WORKDIR ${MOVEIT2_DIR} -RUN vcs import src < /tmp/moveit2_generated_pkgs.repos -COPY --chown=${USERNAME}:${USERNAME} moveit2_tutorials.repos /tmp/ -RUN vcs import src < /tmp/moveit2_tutorials.repos +RUN mkdir -p src && vcs import src < /tmp/moveit2_generated_pkgs.repos +COPY src src # Update the ownership of the source files (had to use sudo above to work around # a possible inherited 'insteadof' from the host that forces use of ssh diff --git a/moveit2/build.sh b/moveit2/build.sh index 04cc00d..d869e05 100755 --- a/moveit2/build.sh +++ b/moveit2/build.sh @@ -14,6 +14,9 @@ echo "" echo "##### Building Space ROS/MoveIt2 Docker Image #####" echo "" +mkdir -p src +vcs import src < ./moveit2.repos + docker build -t $ORG/$IMAGE:$TAG \ --build-arg VCS_REF="$VCS_REF" \ --build-arg VERSION="$VERSION" . diff --git a/moveit2/moveit2_tutorials.repos b/moveit2/moveit2.repos similarity index 83% rename from moveit2/moveit2_tutorials.repos rename to moveit2/moveit2.repos index fa8170d..b252989 100644 --- a/moveit2/moveit2_tutorials.repos +++ b/moveit2/moveit2.repos @@ -15,3 +15,7 @@ repositories: type: git url: https://github.com/PickNikRobotics/rviz_visual_tools.git version: ros2 + moveit2: + type: git + url: https://github.com/ros-planning/moveit2.git + version: humble diff --git a/moveit2/src/moveit2 b/moveit2/src/moveit2 new file mode 160000 index 0000000..d1e097a --- /dev/null +++ b/moveit2/src/moveit2 @@ -0,0 +1 @@ +Subproject commit d1e097a6082b91bc75f1d3d0b56519a76ed41c0e diff --git a/moveit2/src/moveit_task_constructor b/moveit2/src/moveit_task_constructor new file mode 160000 index 0000000..564804b --- /dev/null +++ b/moveit2/src/moveit_task_constructor @@ -0,0 +1 @@ +Subproject commit 564804bd7bb9e320b304b8c4880d96c6ce63b915 diff --git a/moveit2/src/moveit_visual_tools b/moveit2/src/moveit_visual_tools new file mode 160000 index 0000000..cecb7cb --- /dev/null +++ b/moveit2/src/moveit_visual_tools @@ -0,0 +1 @@ +Subproject commit cecb7cb57789345cf1cbde56fcda93633ed5ce50 diff --git a/moveit2/src/rosparam_shortcuts b/moveit2/src/rosparam_shortcuts new file mode 160000 index 0000000..fcb53f8 --- /dev/null +++ b/moveit2/src/rosparam_shortcuts @@ -0,0 +1 @@ +Subproject commit fcb53f8dedbb4f84cb4633bca88d9ce845ecd95c diff --git a/moveit2/src/rviz_visual_tools b/moveit2/src/rviz_visual_tools new file mode 160000 index 0000000..8c2c919 --- /dev/null +++ b/moveit2/src/rviz_visual_tools @@ -0,0 +1 @@ +Subproject commit 8c2c919d5ffee77c2c2ff10ac7dbb0e6bcc3e152 diff --git a/space_robots/Dockerfile b/space_robots/Dockerfile index 84a94d7..0e02311 100644 --- a/space_robots/Dockerfile +++ b/space_robots/Dockerfile @@ -72,11 +72,6 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mo RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install -# 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 sudo apt-get update -y \ && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ diff --git a/space_robots/build.sh b/space_robots/build.sh index 94770d8..65a5115 100755 --- a/space_robots/build.sh +++ b/space_robots/build.sh @@ -14,6 +14,9 @@ echo "" echo "##### Building Space ROS Demo Docker Image #####" echo "" +mkdir -p src +vcs import src < demo_manual_pkgs.repos + docker build -t $ORG/$IMAGE:$TAG \ --build-arg VCS_REF="$VCS_REF" \ --build-arg VERSION="$VERSION" .