Skip to content

Commit

Permalink
fix for cmake build error
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-nv committed Aug 17, 2022
1 parent d5e9d3a commit a7a878e
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions Dockerfile.ros.galactic
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,43 @@ RUN apt-get update && \
gnupg2 \
lsb-release \
ca-certificates \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null


#
# upgrade cmake - https://stackoverflow.com/a/56690743
# this is needed to build some of the ROS2 packages
#
#RUN apt-get update && \
# apt-get install -y --no-install-recommends \
# software-properties-common \
# apt-transport-https \
# ca-certificates \
# gnupg \
# lsb-release \
# && rm -rf /var/lib/apt/lists/* \
# && apt-get clean

#RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \
# apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \
# apt-get update && \
# apt-get install -y --no-install-recommends --only-upgrade \
# cmake \
# && rm -rf /var/lib/apt/lists/* \
# && apt-get clean

# workaround for https://github.com/dusty-nv/jetson-containers/issues/181
RUN apt purge -y cmake && \
pip3 install cmake==3.23.3 --upgrade --verbose

RUN cmake --version


#
# install development packages
#
Expand Down Expand Up @@ -103,30 +133,6 @@ RUN apt-get purge -y '*opencv*' || echo "previous OpenCV installation not found"
cp -r /usr/lib/python${PYTHON3_VERSION}/dist-packages/cv2 /usr/local/lib/python${PYTHON3_VERSION}/dist-packages/cv2


#
# upgrade cmake - https://stackoverflow.com/a/56690743
# this is needed to build some of the ROS2 packages
#
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
apt-transport-https \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \
apt-get update && \
apt-get install -y --no-install-recommends --only-upgrade \
cmake \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN cmake --version


#
# download/build ROS from source
#
Expand Down

0 comments on commit a7a878e

Please sign in to comment.