Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run vcs inside buildkit (#60) #96

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
__pycache__/
*.py[cod]
*$py.class

# vcstool workspaces
moveit2/src
space_robots/src
14 changes: 2 additions & 12 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}
COPY src src
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

# 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
6 changes: 2 additions & 4 deletions space_robots/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ 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"'

COPY src src

RUN sudo apt-get update -y \
&& /bin/bash -c 'source "${SPACEROS_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
Loading