rbonghi / isaac_ros_base

🐋🐋 Multi architecture Isaac ROS for NVIDIA Jetson and x86 - CI based
MIT License
18 stars 5 forks source link

Question about docker build environment: CMake version for docker build seems to be different than my installed version. Environment variable? #9

Open jakoblabs opened 1 year ago

jakoblabs commented 1 year ago

Hi, Thankyou for putting together this repository for Docker! I am attempting to build for Orin Nano Development Kit. I have Jetpack 5.1.1 installed on Orin Nano. I start a build on Orin Nano using:

cd example docker build -t isaac-ros-base/packages:latest -f Dockerfile.isaac .\

The build continues, and then fails with:

_Starting >>> isaac_ros_common Starting >>> isaac_ros_test --- stderr: isaac_ros_common CMake Error at CMakeLists.txt:9 (cmake_minimum_required): CMake 3.23.2 or higher is required. You are running version 3.16.3

Failed <<< isaac_ros_common [0.61s, exited with code 1] Aborted <<< isaac_rostest [1.62s]

I am assuming CMake 3.16.3 is default shipping version with Jetpack 5.1.1?

I will simply update to the latest version of CMake. Is this the correct approach? Thanks for your help!

jakoblabs commented 1 year ago

Here is a quick update: even after I updated to cmake 3.26.4, when running in isaac_ros_base/example directory:

docker build -t isaac-ros-base/packages:latest -f Dockerfile.isaac .

It still throws the error:

Starting >>> isaac_ros_common Starting >>> isaac_ros_test --- stderr: isaac_ros_common CMake Error at CMakeLists.txt:9 (cmake_minimum_required): CMake 3.23.2 or higher is required. You are running version 3.16.3


Failed <<< isaac_ros_common [0.64s, exited with code 1]

I did look in CMakeLists.txt and it is requiring a version later than CMake3.23.2. However I do not understand why docker build still seems to have 3.16.3 in the shell environment, when I did update to 3.26.4

Thanks again for your help! Bob

jakoblabs commented 1 year ago

I ended up adding this into 'Dockerfile.isaac' script to fix the issue.

Install required dependencies

RUN apt-get update && apt-get install --reinstall distro-info RUN apt install apt-utils

bug fix associated with 'Invalid Version '0.23ubuntu1' (6/26/2023)

RUN pip install --upgrade --user setuptools==58.3.0

Set the CMake version

ENV CMAKE_VERSION 3.26.4

Download and install specific CMake version

RUN wget "https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}.tar.gz" && \ tar -xzvf "cmake-${CMAKE_VERSION}.tar.gz" && \ cd "cmake-${CMAKE_VERSION}" && \ ./bootstrap && \ make && \ make install

Remove /usr/bin/cmake

RUN rm -f /usr/bin/cmake

Set the default CMake version

RUN ln -s /usr/local/bin/cmake /usr/bin/cmake