Skip to content

Commit

Permalink
merge apt install to make build step shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
mqcmd196 committed Jan 16, 2025
1 parent 5b3ee77 commit 7f1d7d8
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions l4t.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
curl \
lsb-release \
wget \
&& rm -rf /var/lib/apt/lists/*

# setup sources.list
RUN sudo apt-get update && apt-get install -y lsb-release
RUN sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

# setup keys
Expand All @@ -39,38 +40,28 @@ RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sud
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

ENV ROS_DISTRO noetic

# Remove OpenCV built with CUDA by NVIDIA. It conflicts with original OpenCV deb
RUN apt purge opencv-* -y

# install ros packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-noetic-ros-core=1.5.0-1* \
&& rm -rf /var/lib/apt/lists/*

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
ros-noetic-ros-base=1.5.0-1* \
build-essential \
python3-rosdep \
python3-rosinstall \
python3-vcstools \
ros-noetic-jsk-tools \
ros-noetic-image-transport-plugins \
python3-osrf-pycommon \
python3-catkin-tools \
python3-wstool \
ros-noetic-jsk-pcl-ros \
ros-noetic-jsk-pcl-ros-utils \
&& rm -rf /var/lib/apt/lists/*

# install ros packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-noetic-ros-base=1.5.0-1* \
&& rm -rf /var/lib/apt/lists/*

RUN apt update && apt install python3-osrf-pycommon python3-catkin-tools python3-wstool -y

# Remove OpenCV built with CUDA by NVIDIA. It conflicts with original OpenCV deb
RUN apt purge opencv-* -y

RUN apt update && apt install ros-noetic-jsk-tools -y
RUN apt update && apt install ros-noetic-image-transport-plugins -y

# install launch/sample_detection.launch dependencies if you work with point clouds
RUN apt-get update && apt-get install -y ros-noetic-jsk-pcl-ros ros-noetic-jsk-pcl-ros-utils

WORKDIR /home/user

USER user
Expand All @@ -82,7 +73,6 @@ SHELL ["/bin/bash", "-c"]
########################################
# Installing catkin package
RUN mkdir -p ~/detic_ws/src
RUN sudo apt install -y wget
RUN sudo rosdep init && rosdep update && sudo apt update

# Build detectron2 from source. The aarch64 version is not released
Expand All @@ -105,6 +95,9 @@ RUN cd ~/detic_ws/src &&\
# to avoid conflcit when mounting
RUN rm -rf ~/detic_ws/src/detic_ros/launch

RUN sudo rm -rf /var/lib/apt/lists/*
RUN rm -rf /tmp/detectron2

########################################
########### ENV VARIABLE STUFF #########
########################################
Expand Down

0 comments on commit 7f1d7d8

Please sign in to comment.