Skip to content

Commit

Permalink
Don't run vcs inside buildkit (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
EzraBrooks committed Dec 28, 2023
1 parent c60ab97 commit d66e45a
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
16 changes: 3 additions & 13 deletions moveit2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions moveit2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" .
Expand Down
4 changes: 4 additions & 0 deletions moveit2/moveit2_tutorials.repos → moveit2/moveit2.repos
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions moveit2/src/moveit2
Submodule moveit2 added at d1e097
1 change: 1 addition & 0 deletions moveit2/src/moveit_task_constructor
Submodule moveit_task_constructor added at 564804
1 change: 1 addition & 0 deletions moveit2/src/moveit_visual_tools
Submodule moveit_visual_tools added at cecb7c
1 change: 1 addition & 0 deletions moveit2/src/rosparam_shortcuts
Submodule rosparam_shortcuts added at fcb53f
1 change: 1 addition & 0 deletions moveit2/src/rviz_visual_tools
Submodule rviz_visual_tools added at 8c2c91
5 changes: 0 additions & 5 deletions space_robots/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"' \
Expand Down
3 changes: 3 additions & 0 deletions space_robots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" .
Expand Down

0 comments on commit d66e45a

Please sign in to comment.