rti-connext-dds package prevents building ros2 from source in docker image
I need to build ros2 galactic from source so I can run it on Ubuntu 18.04 roughly following this Dockerfile. I have a different base image that is based on nvidia's cuda's images. I'm running into an issue that the rti-connext-dds package is prompting me to look at a license agreement which is breaking the docker build. I plan on using cyclone-dds...is there a way to force the connext-dds package to not prompt or to just omit that package? The normal DEBIAN_FRONTEND=noninteractive
doesn't seem to work.
The full Dockerfile is kind of long and in it's current state expects a .deb
file for TensorRT is present on the building system and served up via http so it can be wget'd into the build (has size advantages over just copying it), however I'm pretty sure that is irrelevant to the issue at hand and so it can probably be commented out.
In the end, I just skipped installing rti-connext-dds-5.3.1 (it will need to be removed from the skipped keys to reproduce the behavior) and that got me going again, although it doesn't really fix the problem.
FROM nvidia/cudagl:10.2-devel-ubuntu18.04 as devel
ARG DEBIAN_FRONTEND=noninteractive
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# setup timezone
# https://serverfault.com/questions/683605/docker-container-time-timezone-will-not-reflect-changes/683651
RUN echo 'America/New_York' > /etc/timezone && \
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime && \
apt-get update && apt-get install -q -y tzdata
RUN apt-get update && apt-get upgrade -y && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
ARG CMAKE_VERSION=3.21.2
ARG GCC_VERSION=11
# install basic build environment
RUN apt-get update && \
apt-get install --no-install-recommends -y \
software-properties-common \
wget \
curl \
git \
gitk \
gdb \
pkg-config \
ninja-build \
python3-dev \
python3-pip && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get install gcc-${GCC_VERSION} g++-${GCC_VERSION} -y && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 70 --slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} && \
wget -O cmake.sh https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh && \
chmod +x cmake.sh && \
./cmake.sh --prefix=/usr/local --skip-license && \
apt-get autoremove -y && \
apt-get clean -y && \
add-apt-repository ppa:ubuntu-toolchain-r/test -yr && \
rm -rf /var/lib/apt/lists/* cmake.sh
# install TensorRT
#COPY nv-tensorrt-repo-ubuntu1804-cuda10.2-trt8.0.1.6-ga-20210626_1-1_amd64.deb /trt.deb
# this requires a simple http server be running on local host and that the build command was issued
# with the --network=host option
# https://docs.nvidia.com/deeplearning/tensorrt/sample-support-guide/index.html#c_samples_section
RUN wget -O /trt.deb http://localhost:8000/nv-tensorrt-repo-ubuntu1804-cuda10.2-trt8.0.1.6-ga-20210626_1-1_amd64.deb && \
dpkg -i \
/trt.deb && \
cd /var/nv-tensorrt-repo-ubuntu1804-cuda10.2-trt8.0.1.6-ga-20210626 && \
dpkg -i \
libcudnn8_8.2.1.32-1+cuda10.2_amd64.deb \
libnvinfer8_8.0.1-1+cuda10.2_amd64.deb \
libnvonnxparsers8_8 ...
Can you give the exact Dockerfile you're using and the exact line that is causing the error?
Dockerfile in all its glory is posted
Could you clarify what your question is?
Is it how to deal with the
rti-connext
.deb
in aDockerfile
or something else?Please update your question title to be more descriptive, as right now it's very generic.
yes that's it...because that file get's installed in a Dockerfile, user interactivity isn't possible...the DEBIAN_FRONTEND variable is supposed to fix that, but it appears not to be respected. I worked around it by skipping it's installation, but that's not a fix.
Please update your questions title to be more descriptive.
"build ros 2 in a docker image" does not describe your problem accurately.