Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Docker config for carma-base to be built in ARM with ROS2 Humble for C1T #187

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
79 changes: 3 additions & 76 deletions Dockerfile
willjohnsonk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,70 +33,6 @@ LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-platfor
LABEL org.label-schema.vcs-ref=${VCS_REF}
LABEL org.label-schema.build-date=${BUILD_DATE}

# Avoid interactive prompts during the building of this docker image
ARG DEBIAN_FRONTEND="noninteractive"

ARG AUTOWAREAUTO_DEPS="coinor-libipopt-dev \
coinor-libipopt1v5 \
libarmadillo-dev \
libcgal-dev \
libmumps-5.2.1 \
libmumps-dev \
libmumps-seq-5.2.1 \
libmumps-seq-dev \
libproj-dev \
libscalapack-mpi-dev \
libscalapack-openmpi-dev \
libscalapack-openmpi2.1 \
libscotch-6.0"

ARG BASE_DEPS="gnupg2 \
locales \
openssl \
python3-rosinstall \
xterm \
libmsgsl-dev"

ARG ROS_DEPS="apt-transport-https \
apt-utils \
automake \
autotools-dev \
dialog \
gcovr \
gdb \
git \
gnuplot-qt \
jq \
less \
libboost-python-dev \
libfftw3-dev \
libgeographic-dev \
libgmock-dev \
libnl-genl-3-dev \
libopenblas-dev \
libpcap-dev \
libpugixml-dev \
lttng-tools \
lttng-modules-dkms \
liblttng-ust-dev \
mesa-utils \
nano \
nodejs \
python3-babeltrace \
python3-future \
python3-lttng \
python3-testresources \
python3-pybind11 \
software-properties-common \
sqlite3 \
ssh \
sudo \
tmux \
unzip \
vim \
wait-for-it \
x-window-system"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Add carma user
Expand All @@ -116,19 +52,10 @@ COPY --chown=carma package.xml /home/carma/.base-image/workspace/src/carma_base/
COPY --chown=carma entrypoint.sh init-env.sh /home/carma/.base-image/
COPY --chown=carma ./code_coverage /home/carma/.ci-image/engineering_tools/code_coverage

# Layer for installing base dependencies
RUN apt-get update && \
apt-get install --no-install-recommends --yes ${BASE_DEPS}

# Layer for installing Autoware/ROS2/misc dependencies
# Layer for installing dependencies
# NOTE: Sonarcloud does not seem to support ARM, further investigation needed
willjohnsonk marked this conversation as resolved.
Show resolved Hide resolved
RUN apt-get update && \
apt-get install --no-install-recommends --yes ${AUTOWAREAUTO_DEPS} ${ROS_DEPS} && \
RUN apt-get update && \\
sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt/sources.list && \
willjohnsonk marked this conversation as resolved.
Show resolved Hide resolved
# # Install AutonomouStuff dependencies
# sh -c 'echo "deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/autonomoustuff-public.list' && \
# apt-get update && \
# apt-get install --no-install-recommends --yes libas-common && \
# Download a cmake module for PROJ, needed for lanelet2_extension, autoware_lanelet2_ros_interface, and maybe more
willjohnsonk marked this conversation as resolved.
Show resolved Hide resolved
curl --output /usr/share/cmake-3.16/Modules/FindPROJ4.cmake https://raw.githubusercontent.com/mloskot/cmake-modules/master/modules/FindPROJ4.cmake && \
# Install version 45.2.0 for setuptools since that is the latest version available for ubuntu focal
Expand All @@ -144,7 +71,7 @@ RUN apt-get update && \

# Layer for building ROS2 Humble packages from source
# NOTICE: needs to be chmod +x
COPY install_pkgs.sh install_pkgs.sh
COPY install_pkgs.sh install_pkgs.sh
RUN ./install_pkgs.sh


Expand Down
3 changes: 0 additions & 3 deletions init-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ export CUDA_BIN_PATH=/usr/local/cuda
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin

if [ -f "/opt/autoware.ai/ros/install/setup.bash" ]; then
source /opt/autoware.ai/ros/install/setup.bash
fi

if [ -f "/opt/carma/install/setup.bash" ]; then
source /opt/carma/install/setup.bash
Expand Down
7 changes: 3 additions & 4 deletions install_pkgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

apt update

export ROS_PACKAGE_PATH=/opt/ros/humble/install/share
export PYTHONPATH="opt/ros/humble/install/lib/python3.8/site-packages/"
export CMAKE_PREFIX_PATH="/opt/ros/humble/install"
export ROS_PACKAGE_PATH='/opt/ros/humble/install/share'
export PYTHONPATH='/opt/ros/humble/install/lib/python3.8/site-packages/:$PYTHONPATH'
export CMAKE_PREFIX_PATH='/opt/ros/humble/install'

mkdir -p /opt/ros/humble/src
cd /opt/ros/humble
Expand Down Expand Up @@ -35,7 +35,6 @@ rosinstall_generator --deps --rosdistro humble \
rosbag2 \
--exclude RPP \
> ros2.humble.ros_base.rosinstall
cat ros2.humble.ros_base.rosinstall
vcs import src < ros2.humble.ros_base.rosinstall

rosdep update
Expand Down
Loading