This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.isaac
119 lines (108 loc) 路 4.46 KB
/
Dockerfile.isaac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
ARG BASE_IMAGE=rbonghi/isaac-ros-base:humble-base-devel
FROM ${BASE_IMAGE}
LABEL io.k8s.display-name="isaac_ros humble"
LABEL name="isaac_ros humble"
LABEL vendor="NVIDIA"
LABEL version="2.0.0"
LABEL release="N/A"
LABEL summary="isaac_ros humble"
LABEL description="All Isaac ROS packages built"
################ INSTALL ISAAC ROS ####################
# sklearn dependencies
RUN apt-add-repository ppa:mosquitto-dev/mosquitto-ppa \
&& apt-get update \
&& apt-get install -y \
gfortran \
libatlas-base-dev \
python3-scipy \
# Add MQTT binaries and libraries
mosquitto \
mosquitto-clients \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# sklearn Python dependencies
# Note: VPN cannot be on for pymongo download
RUN python3 -m pip install -U \
Cython \
wheel \
pymongo \
paho-mqtt
# Install sklearn
RUN python3 -m pip install -U \
scikit-learn
###### ROS - packages ################################
# Clone all packages from rosinstall
RUN mkdir -p ${ROS_ROOT}/src \
&& cd ${ROS_ROOT} \
&& rosinstall_generator --deps --rosdistro ${ROS_DISTRO} \
behaviortree_cpp_v3 \
slam_toolbox \
ompl \
# navigation2 \
> ros2.${ROS_DISTRO}.rosinstall \
&& cat ros2.${ROS_DISTRO}.rosinstall \
&& vcs import src < ros2.${ROS_DISTRO}.rosinstall \
&& rm ${ROS_ROOT}/*.rosinstall \
# Load variable ROS2
&& . /opt/ros/$ROS_DISTRO/install/setup.sh \
&& apt-get update \
&& rosdep install -y \
--ignore-src \
--from-paths src \
--rosdistro ${ROS_DISTRO} \
--skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers libopencv-dev libopencv-contrib-dev libopencv-imgproc-dev python-opencv python3-opencv ament_python" \
&& rm -Rf /var/lib/apt/lists/* \
&& apt-get clean \
# Build Isaac ROS and clean resources
&& colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to behaviortree_cpp_v3 \
&& colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& rm -Rf src build log
###### Isaac ROS - packages ##########################
ENV ISAAC_ROS_ROOT /opt/ros/isaac_ros_ws
# Copy wstool isaac_ros.rosinstall
COPY scripts/rosinstall/isaac_ros_all.rosinstall /isaac_ros_all.rosinstall
# Import also all Isaac ROS packages
RUN mkdir -p ${ISAAC_ROS_ROOT}/src \
&& cd ${ISAAC_ROS_ROOT} \
&& vcs import ${ISAAC_ROS_ROOT}/src < /isaac_ros_all.rosinstall \
&& rm /isaac_ros_all.rosinstall \
# Add Argus camera repo if on aarch64
#&& if [ "$(uname -m)" = "aarch64" ]; then \
# git -C ${ISAAC_ROS_ROOT}/src clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_argus_camera.git ; \
#fi \
# Install dependencies using rosdep
# Load variable ROS2
&& . /opt/ros/$ROS_DISTRO/install/setup.sh \
&& apt-get update \
&& rosdep install -y \
--ignore-src \
--from-paths src \
--rosdistro ${ROS_DISTRO} \
--skip-keys "ament_python nav2_bringup nav2_recoveries rcl_yaml_parser h264_msgs OpenCV" \
&& rm -Rf /var/lib/apt/lists/* \
&& apt-get clean \
# Build Isaac ROS and clean resources
&& colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& rm -Rf src build log
# Test all packages
#RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \
# colcon test --merge-install --executor sequential