Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Oct 24, 2024
1 parent 879e710 commit 9115c18
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
2 changes: 0 additions & 2 deletions Dockerfile.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ RUN echo "deb http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources
RUN apt-get update || true && \
apt-get install --no-install-recommends -y \
ros-${ROS_DISTRO}-ros-base \
ros-${ROS_DISTRO}-ament-cmake-clang-format \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-image-transport-plugins \
ros-${ROS_DISTRO}-diagnostic-updater \
Expand Down Expand Up @@ -125,7 +124,6 @@ RUN echo "deb http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources
RUN apt-get update || true && \
apt-get install --no-install-recommends -y \
ros-${ROS_DISTRO}-ros-base \
ros-${ROS_DISTRO}-ament-cmake-clang-format \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-image-transport-plugins \
ros-${ROS_DISTRO}-diagnostic-updater \
Expand Down
51 changes: 26 additions & 25 deletions Dockerfile.jetson
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Reference: https://github.com/stereolabs/zed-ros2-wrapper/tree/master/docker

ARG L4T_MAJOR=35
ARG L4T_MINOR=3
ARG JP_MAJOR=6
ARG JP_MINOR=0
ARG JP_PATCH=0
ARG ZED_SDK_MAJOR=4
ARG ZED_SDK_MINOR=0
ARG ROS_DISTRO=foxy
ARG ZED_SDK_MINOR=2
ARG ROS_DISTRO=humble

### BUILD IMAGE ###
FROM stereolabs/zed:${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}-devel-l4t-r${L4T_MAJOR}.${L4T_MINOR} AS build
FROM stereolabs/zed:${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}-devel-jetson-jp${JP_MAJOR}.${JP_MINOR}.${JP_PATCH} AS build

ARG L4T_MAJOR
ARG L4T_MINOR
ARG JP_MAJOR
ARG JP_MINOR
ARG JP_PATCH
ARG ZED_SDK_MAJOR
ARG ZED_SDK_MINOR
ARG ROS_DISTRO
Expand All @@ -22,19 +24,19 @@ ENV NVIDIA_DRIVER_CAPABILITIES \

# ROS install
ENV ROS_DISTRO $ROS_DISTRO
RUN echo "deb http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
apt-get update && \
apt-get install -y --no-install-recommends \
ros-$ROS_DISTRO-ros-core \
&& rm -rf /var/lib/apt/lists/*
RUN apt update && apt install curl -y && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
apt update && apt upgrade -y && \
apt install -y --no-install-recommends ros-$ROS_DISTRO-ros-core && \
rm -rf /var/lib/apt/lists/*


# ZED setup
RUN apt-get update || true && \
apt-get install --no-install-recommends -y \
ros-dev-tools \
ros-${ROS_DISTRO}-ros-base \
ros-${ROS_DISTRO}-ament-cmake-clang-format \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-image-transport-plugins \
ros-${ROS_DISTRO}-diagnostic-updater \
Expand Down Expand Up @@ -81,13 +83,13 @@ RUN source /opt/ros/$ROS_DISTRO/setup.bash && \
' -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs' \
' -DCMAKE_CXX_FLAGS="-Wl,--allow-shlib-undefined"' \
' --no-warn-unused-cli' && \
rm -rf build log src
rm -rf build log

### RUNTIME IMAGE ### # Reduction from 6.1GB to 3.9GB
FROM stereolabs/zed:${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}-runtime-l4t-r${L4T_MAJOR}.${L4T_MINOR} AS runtime
FROM stereolabs/zed:${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}-runtime-jetson-jp${JP_MAJOR}.${JP_MINOR}.${JP_PATCH} AS runtime

ARG L4T_MAJOR
ARG L4T_MINOR
ARG JP_MAJOR
ARG JP_MINOR
ARG ZED_SDK_MAJOR
ARG ZED_SDK_MINOR
ARG ROS_DISTRO
Expand All @@ -99,19 +101,18 @@ ENV NVIDIA_DRIVER_CAPABILITIES \

# ROS install
ENV ROS_DISTRO $ROS_DISTRO
RUN echo "deb http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && \
apt-get update && \
apt-get install -y --no-install-recommends \
ros-$ROS_DISTRO-ros-core \
&& rm -rf /var/lib/apt/lists/*
RUN apt update && apt install curl -y && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null && \
apt update && apt upgrade -y && \
apt install -y --no-install-recommends ros-$ROS_DISTRO-ros-core && \
rm -rf /var/lib/apt/lists/*

# ZED setup
RUN apt-get update || true && \
apt-get install --no-install-recommends -y \
ros-dev-tools \
ros-${ROS_DISTRO}-ros-base \
ros-${ROS_DISTRO}-ament-cmake-clang-format \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-image-transport-plugins \
ros-${ROS_DISTRO}-diagnostic-updater \
Expand Down

0 comments on commit 9115c18

Please sign in to comment.