Skip to content
Snippets Groups Projects
Commit e0ae0462 authored by Montaño Sarria, Andres Felipe's avatar Montaño Sarria, Andres Felipe
Browse files

New docker file with support for requirements (dependencies) comming from text file

parent 99b5ea99
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,9 @@ ENV LANG en_US.UTF-8 ...@@ -16,8 +16,9 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
# Configure apt and install packages # Configure apt and install ubuntu-base packages
RUN apt-get update && apt-get -y install --no-install-recommends \ RUN apt-get update && \
apt-get -y install --no-install-recommends \
apt-transport-https \ apt-transport-https \
ca-certificates \ ca-certificates \
curl \ curl \
...@@ -42,48 +43,29 @@ RUN apt-get update && apt-get -y install --no-install-recommends \ ...@@ -42,48 +43,29 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
nano \ nano \
net-tools \ net-tools \
openssh-client \ openssh-client \
terminator \
trash-cli \ trash-cli \
valgrind \ valgrind \
xterm \ xterm \
wget \ wget \
zsh zsh
RUN if [ "${ROS_DISTRO}" != "humble" ]; \ # ZSH tools based on ubuntu version
then \ WORKDIR /tmp/srcs/
apt-get -y install \ COPY /extra_libs/* ./
ros-${ROS_DISTRO}-catkin \
ros-${ROS_DISTRO}-plotjuggler \
ros-${ROS_DISTRO}-plotjuggler-ros \
ros-${ROS_DISTRO}-rosmon \
ros-${ROS_DISTRO}-rqt-controller-manager \
ros-${ROS_DISTRO}-rqt-joint-trajectory-controller; \
fi
RUN if [ "${ROS_DISTRO}" = "noetic" ]; \ RUN if [ "${ROS_DISTRO}" = "melodic" ]; \
then \
apt-get -y install \
ipython3 \
python-is-python3 \
python3-catkin-tools \
python3-click \
python3-numpy \
python3-osrf-pycommon \
python3-vcstool \
# clang
clangd liblldb-dev libllvm-ocaml-dev python3-clang; \
elif [ "${ROS_DISTRO}" = "melodic" ]; \
then \ then \
apt-get -y install \ dpkg -i *.deb; \
ipython \
python-catkin-tools \
python-pip \
python-osrf-pycommon\
python-vcstool; \
else \ else \
echo "Not supported version"; \ dpkg -i bat*.deb; \
dpkg -i lsd*.deb; \
dpkg -i ripgrep*.deb; \
fi fi
RUN rm -rf *
RUN apt-get --reinstall install -y libnotify-bin notify-osd
# Configure system to look for debian packages in the Artifactory repository # Configure system to look for debian packages in the Artifactory repository
COPY auth.conf /etc/apt/auth.conf.d/tecnalia.conf COPY auth.conf /etc/apt/auth.conf.d/tecnalia.conf
...@@ -105,146 +87,58 @@ RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/git ...@@ -105,146 +87,58 @@ RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/git
# containerd.io \ # containerd.io \
# docker-compose-plugin # docker-compose-plugin
# Install pip3 and packages # Install python - python3 packages based on ubuntu version
RUN apt-get install -y \ RUN if [ "${ROS_DISTRO}" = "melodic" ]; \
python3-pip \
&& pip3 install sqlite_utils \
&& pip3 install conan==1.59 \
&& conan config set general.revisions_enabled=1 \
&& conan profile new default --detect > /dev/null \
&& conan profile update settings.compiler=gcc default
# Install node for UIs
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash \
&& apt-get install -y nodejs && npm -g install yarn
# ROS 1 WS dependencies
RUN if [ "${ROS_DISTRO}" != "humble" ]; \
then \ then \
apt-get update && \
apt-get -y install \ apt-get -y install \
cython \ ipython \
libceres-dev \ python-catkin-tools \
libcomedi-dev \ python-pip \
libglfw3-dev \ python-osrf-pycommon\
libmodbus-dev \ python-vcstool; \
python-numpy \
python3-mock \
socat \
ros-${ROS_DISTRO}-ackermann-msgs \
ros-${ROS_DISTRO}-amcl \
ros-${ROS_DISTRO}-cartesian-trajectory-controller \
ros-${ROS_DISTRO}-chomp-motion-planner \
ros-${ROS_DISTRO}-collada-urdf \
ros-${ROS_DISTRO}-effort-controllers \
ros-${ROS_DISTRO}-force-torque-sensor-controller \
ros-${ROS_DISTRO}-gmapping \
ros-${ROS_DISTRO}-hector-gazebo-plugins \
ros-${ROS_DISTRO}-hector-mapping \
ros-${ROS_DISTRO}-imu-complementary-filter \
ros-${ROS_DISTRO}-imu-tools \
ros-${ROS_DISTRO}-industrial-core \
ros-${ROS_DISTRO}-industrial-robot-simulator \
ros-${ROS_DISTRO}-industrial-robot-status-controller \
ros-${ROS_DISTRO}-industrial-robot-status-interface \
ros-${ROS_DISTRO}-interactive-marker-twist-server \
ros-${ROS_DISTRO}-joint-trajectory-controller \
ros-${ROS_DISTRO}-joy \
ros-${ROS_DISTRO}-lms1xx \
ros-${ROS_DISTRO}-map-server \
ros-${ROS_DISTRO}-mavros-msgs \
ros-${ROS_DISTRO}-move-base \
ros-${ROS_DISTRO}-moveit-commander \
ros-${ROS_DISTRO}-moveit-fake-controller-manager \
ros-${ROS_DISTRO}-moveit-planners-chomp \
ros-${ROS_DISTRO}-moveit-planners-ompl \
ros-${ROS_DISTRO}-moveit-resources \
ros-${ROS_DISTRO}-moveit-ros-benchmarks \
ros-${ROS_DISTRO}-moveit-ros-control-interface \
ros-${ROS_DISTRO}-moveit-ros-move-group \
ros-${ROS_DISTRO}-moveit-ros-planning-interface \
ros-${ROS_DISTRO}-moveit-ros-visualization \
ros-${ROS_DISTRO}-moveit-ros-warehouse \
ros-${ROS_DISTRO}-moveit-setup-assistant \
ros-${ROS_DISTRO}-moveit-simple-controller-manager \
ros-${ROS_DISTRO}-moveit-visual-tools \
ros-${ROS_DISTRO}-navigation \
ros-${ROS_DISTRO}-pass-through-controllers \
ros-${ROS_DISTRO}-pilz-industrial-motion \
ros-${ROS_DISTRO}-rc-visard \
ros-${ROS_DISTRO}-realsense2-camera \
ros-${ROS_DISTRO}-realsense2-description \
ros-${ROS_DISTRO}-robot-localization \
ros-${ROS_DISTRO}-ros-control \
ros-${ROS_DISTRO}-ros-control-boilerplate \
ros-${ROS_DISTRO}-ros-controllers \
ros-${ROS_DISTRO}-ros-industrial-cmake-boilerplate \
ros-${ROS_DISTRO}-rosbridge-server \
ros-${ROS_DISTRO}-scaled-joint-trajectory-controller \
ros-${ROS_DISTRO}-serial \
ros-${ROS_DISTRO}-spacenav-node \
ros-${ROS_DISTRO}-speed-scaling-interface \
ros-${ROS_DISTRO}-speed-scaling-state-controller \
ros-${ROS_DISTRO}-teb-local-planner \
ros-${ROS_DISTRO}-trac-ik-kinematics-plugin \
ros-${ROS_DISTRO}-twist-controller \
ros-${ROS_DISTRO}-twist-mux \
ros-${ROS_DISTRO}-ur-client-library \
ros-${ROS_DISTRO}-ur-msgs \
ros-${ROS_DISTRO}-usb-cam \
ros-${ROS_DISTRO}-velocity-controllers \
ros-${ROS_DISTRO}-warehouse-ros-mongo; \
# ROS2 Humble dpendencies
else\ else\
apt-get -y install \ apt-get update && \
ros-${ROS_DISTRO}-moveit \
ros-${ROS_DISTRO}-ros2-control; \
fi
RUN if [ "${ROS_DISTRO}" = "noetic" ]; \
then \
apt-get -y install \ apt-get -y install \
ipython3 \ ipython3 \
python-is-python3 \ python-is-python3 \
python3-catkin-tools \
python3-click \ python3-click \
ros-${ROS_DISTRO}-libpcan \
python3-numpy \ python3-numpy \
python3-tk \ python3-osrf-pycommon \
python3-osrf-pycommon; \ python3-vcstool \
elif [ "${ROS_DISTRO}" = "melodic" ]; \ python3-pip \
# clang
clangd liblldb-dev libllvm-ocaml-dev python3-clang; \
fi
# Install ROS 1 tools
RUN if [ "${ROS_DISTRO}" != "humble" ]; \
then \ then \
apt-get update && \
apt-get -y install \ apt-get -y install \
ros-${ROS_DISTRO}-ar-track-alvar \ ros-${ROS_DISTRO}-catkin \
python-mock \ ros-${ROS_DISTRO}-plotjuggler \
python-funcsigs \ ros-${ROS_DISTRO}-plotjuggler-ros \
python-sqlalchemy \ ros-${ROS_DISTRO}-rosmon \
python3-rospkg-modules \ ros-${ROS_DISTRO}-rqt-controller-manager \
python3-yaml; \ ros-${ROS_DISTRO}-rqt-joint-trajectory-controller; \
else \
echo "Not supported version"; \
fi fi
WORKDIR /tmp/srcs/ # Copy the requirements.txt file into the container
COPY /extra_libs/* ./ WORKDIR /tmp/dependencies/
COPY /ws_dependencies/* ./
RUN if [ "${ROS_DISTRO}" = "noetic" ]; \ # Install the packages listed in ${ROS_DISTRO}_requirements.txt
then \ RUN if [ -f "${ROS_DISTRO}_requirements.txt" ]; \
dpkg -i bat*.deb; \
dpkg -i lsd*.deb; \
dpkg -i ripgrep*.deb; \
elif [ "${ROS_DISTRO}" = "melodic" ]; \
then \ then \
dpkg -i *.deb; \ apt-get update && \
else \ apt-get install -y $(cat ${ROS_DISTRO}_requirements.txt);\
echo "Not supported version"; \
fi fi
RUN rm -rf * RUN rm -rf *
RUN apt-get --reinstall install -y libnotify-bin notify-osd
# Update this date to re-run the image final update # Update this date to re-run the image final update
LABEL image.date=24-08-2023 LABEL image.date=17-10-2023
# Update final image # Update final image
RUN apt-get update \ RUN apt-get update \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment