Skip to content

Commit 59abebe

Browse files
attempt overhaul
1 parent 4681ad9 commit 59abebe

379 files changed

Lines changed: 292 additions & 218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ROS2/AMD64x86/humble/Dockerfile

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,78 +6,55 @@ ARG USERNAME=container_user
66
ARG USER_UID=1000
77
ARG USER_GID=$USER_UID
88

9-
# Add the following labels
9+
# Add metadata labels
1010
LABEL org.opencontainers.image.description="Docker Development Container"
11-
LABEL org.opencontainers.image.title="ROS2Dev"
11+
LABEL org.opencontainers.image.title="RRC Humble"
1212
LABEL org.opencontainers.image.vendor="Tarun R"
1313
LABEL org.opencontainers.image.source="https://github.com/Smart-Wheelchair-RRC/DockerForDevelopment"
1414
LABEL maintainer="tarun.ramak@gmail.com"
1515
LABEL org.opencontainers.image.licenses="MIT"
1616

17-
# handle default shell
17+
# configure bash shell
1818
SHELL ["/bin/bash", "-c"]
1919
ENV SHELL=/bin/bash
2020

21+
# set ROS distro env
22+
ENV ROS_DISTRO=$ROS_DISTRO
23+
24+
# setup locales
25+
ENV LANG=C.UTF-8
26+
ENV LC_ALL=C.UTF-8
27+
2128
# setup timezone
2229
RUN echo 'Asia/Kolkata' > /etc/timezone && \
23-
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime && \
24-
apt-get update && \
25-
apt-get install -q -y --no-install-recommends tzdata && \
26-
rm -rf /var/lib/apt/lists/*
30+
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtimeeinfo/Asia/Kolkata /etc/localtime
2731

2832
# install packages
33+
COPY aptPkgs.list /tmp/aptPkgs.list
2934
RUN apt-get update && apt-get install -q -y --no-install-recommends \
30-
dirmngr \
31-
gnupg2 \
32-
curl \
33-
ca-certificates \
34-
&& rm -rf /var/lib/apt/lists/*
35-
36-
# Setup ROS Apt sources
37-
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
38-
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
39-
&& apt-get update \
40-
&& apt-get install /tmp/ros2-apt-source.deb \
41-
&& rm -f /tmp/ros2-apt-source.deb \
35+
$(cat /tmp/aptPkgs.list) \
4236
&& rm -rf /var/lib/apt/lists/*
4337

44-
# setup environment
45-
ENV LANG=C.UTF-8
46-
ENV LC_ALL=C.UTF-8
47-
4838
# Create non root user with sudo privilege
4939
RUN groupadd --gid $USER_GID $USERNAME \
5040
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
51-
&& apt-get update \
52-
&& apt-get install -y sudo \
5341
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
5442
&& chmod 0440 /etc/sudoers.d/$USERNAME
5543
USER $USERNAME
5644

57-
ENV ROS_DISTRO=$ROS_DISTRO
58-
59-
# install ros2 packages
60-
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
61-
ros-$ROS_DISTRO-desktop \
62-
&& sudo rm -rf /var/lib/apt/lists/*
45+
# Setup ROS Apt sources
46+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
47+
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
48+
&& apt-get update \
49+
&& apt-get install /tmp/ros2-apt-source.deb \
50+
&& rm -f /tmp/ros2-apt-source.deb \
51+
&& rm -rf /var/lib/apt/lists/*
6352

6453
# setup entrypoint
6554
COPY ./ros_entrypoint.sh /
6655

6756
ENTRYPOINT ["/ros_entrypoint.sh"]
6857

69-
# install bootstrap tools
70-
RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \
71-
build-essential \
72-
git \
73-
bash-completion \
74-
python3-colcon-common-extensions \
75-
python3-colcon-mixin \
76-
python3-rosdep \
77-
python3-vcstool \
78-
python3-pip \
79-
&& sudo rm -rf /var/lib/apt/lists/*
80-
8158
# bootstrap rosdep
8259
RUN sudo rosdep init && \
8360
rosdep update --rosdistro $ROS_DISTRO

ROS2/AMD64x86/humble/aptPkgs.list

Whitespace-only changes.
Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,60 @@
1-
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
1+
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04
22

33
# basic args
44
ARG ROS_DISTRO=humble
55
ARG USERNAME=container_user
66
ARG USER_UID=1000
77
ARG USER_GID=$USER_UID
88

9-
# Add the following labels
9+
# Add metadata labels
1010
LABEL org.opencontainers.image.description="Docker Development Container"
11-
LABEL org.opencontainers.image.title="ROS2Dev"
11+
LABEL org.opencontainers.image.title="RRC Humble"
1212
LABEL org.opencontainers.image.vendor="Tarun R"
1313
LABEL org.opencontainers.image.source="https://github.com/Smart-Wheelchair-RRC/DockerForDevelopment"
1414
LABEL maintainer="tarun.ramak@gmail.com"
1515
LABEL org.opencontainers.image.licenses="MIT"
1616

17-
# handle default shell
17+
# configure bash shell
1818
SHELL ["/bin/bash", "-c"]
1919
ENV SHELL=/bin/bash
2020

21+
# set ROS distro env
22+
ENV ROS_DISTRO=$ROS_DISTRO
23+
24+
# setup locales
25+
ENV LANG=C.UTF-8
26+
ENV LC_ALL=C.UTF-8
27+
2128
# setup timezone
2229
RUN echo 'Asia/Kolkata' > /etc/timezone && \
23-
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime && \
24-
apt-get update && \
25-
apt-get install -q -y --no-install-recommends tzdata && \
26-
rm -rf /var/lib/apt/lists/*
30+
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtimeeinfo/Asia/Kolkata /etc/localtime
2731

2832
# install packages
33+
COPY aptPkgs.list /tmp/aptPkgs.list
2934
RUN apt-get update && apt-get install -q -y --no-install-recommends \
30-
dirmngr \
31-
gnupg2 \
32-
curl \
33-
ca-certificates \
34-
&& rm -rf /var/lib/apt/lists/*
35-
36-
# Setup ROS Apt sources
37-
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
38-
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
39-
&& apt-get update \
40-
&& apt-get install /tmp/ros2-apt-source.deb \
41-
&& rm -f /tmp/ros2-apt-source.deb \
35+
$(cat /tmp/aptPkgs.list) \
4236
&& rm -rf /var/lib/apt/lists/*
4337

44-
# setup environment
45-
ENV LANG=C.UTF-8
46-
ENV LC_ALL=C.UTF-8
47-
4838
# Create non root user with sudo privilege
4939
RUN groupadd --gid $USER_GID $USERNAME \
5040
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
51-
&& apt-get update \
52-
&& apt-get install -y sudo \
5341
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
5442
&& chmod 0440 /etc/sudoers.d/$USERNAME
5543
USER $USERNAME
5644

57-
ENV ROS_DISTRO=$ROS_DISTRO
58-
59-
# install ros2 packages
60-
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
61-
ros-$ROS_DISTRO-desktop \
62-
&& sudo rm -rf /var/lib/apt/lists/*
45+
# Setup ROS Apt sources
46+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
47+
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
48+
&& apt-get update \
49+
&& apt-get install /tmp/ros2-apt-source.deb \
50+
&& rm -f /tmp/ros2-apt-source.deb \
51+
&& rm -rf /var/lib/apt/lists/*
6352

6453
# setup entrypoint
6554
COPY ./ros_entrypoint.sh /
6655

6756
ENTRYPOINT ["/ros_entrypoint.sh"]
6857

69-
# install bootstrap tools
70-
RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \
71-
build-essential \
72-
git \
73-
bash-completion \
74-
python3-colcon-common-extensions \
75-
python3-colcon-mixin \
76-
python3-rosdep \
77-
python3-vcstool \
78-
python3-pip \
79-
&& sudo rm -rf /var/lib/apt/lists/*
80-
8158
# bootstrap rosdep
8259
RUN sudo rosdep init && \
8360
rosdep update --rosdistro $ROS_DISTRO

ROS2/AMD64x86/humble_cuda/aptPkgs.list

Whitespace-only changes.
File renamed without changes.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
2+
3+
4+
5+
# basic args
6+
ARG ROS_DISTRO=humble
7+
ARG USERNAME=container_user
8+
ARG USER_UID=1000
9+
ARG USER_GID=$USER_UID
10+
11+
# Add metadata labels
12+
LABEL org.opencontainers.image.description="Docker Development Container"
13+
LABEL org.opencontainers.image.title="RRC Humble"
14+
LABEL org.opencontainers.image.vendor="Tarun R"
15+
LABEL org.opencontainers.image.source="https://github.com/Smart-Wheelchair-RRC/DockerForDevelopment"
16+
LABEL maintainer="tarun.ramak@gmail.com"
17+
LABEL org.opencontainers.image.licenses="MIT"
18+
19+
# configure bash shell
20+
SHELL ["/bin/bash", "-c"]
21+
ENV SHELL=/bin/bash
22+
23+
# set ROS distro env
24+
ENV ROS_DISTRO=$ROS_DISTRO
25+
ENV GZ_VERSION=harmonic
26+
27+
# setup locales
28+
ENV LANG=C.UTF-8
29+
ENV LC_ALL=C.UTF-8
30+
31+
# setup timezone
32+
RUN echo 'Asia/Kolkata' > /etc/timezone && \
33+
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtimeeinfo/Asia/Kolkata /etc/localtime
34+
35+
# install packages
36+
COPY aptPkgs.list /tmp/aptPkgs.list
37+
RUN apt-get update && apt-get install -q -y --no-install-recommends \
38+
$(cat /tmp/aptPkgs.list) \
39+
&& rm -rf /var/lib/apt/lists/*
40+
41+
# Create non root user with sudo privilege
42+
RUN groupadd --gid $USER_GID $USERNAME \
43+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
44+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
45+
&& chmod 0440 /etc/sudoers.d/$USERNAME
46+
USER $USERNAME
47+
48+
# Setup ROS Apt sources
49+
RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \
50+
&& echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \
51+
&& apt-get update \
52+
&& apt-get install /tmp/ros2-apt-source.deb \
53+
&& rm -f /tmp/ros2-apt-source.deb \
54+
&& rm -rf /var/lib/apt/lists/*
55+
56+
# setup entrypoint
57+
COPY ./ros_entrypoint.sh /
58+
59+
ENTRYPOINT ["/ros_entrypoint.sh"]
60+
61+
# bootstrap rosdep
62+
RUN sudo rosdep init && \
63+
rosdep update --rosdistro $ROS_DISTRO
64+
65+
# setup colcon mixin and metadata
66+
RUN sudo colcon mixin add default \
67+
https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \
68+
sudo colcon mixin update && \
69+
sudo colcon metadata add default \
70+
https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
71+
sudo colcon metadata update
72+
73+
RUN sudo pip3 install -U \
74+
argcomplete
75+
76+
# echo sources
77+
RUN echo 'source /usr/share/bash-completion/bash_completion' | sudo tee -a ~/.bashrc > /dev/null && \
78+
echo 'source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash' | sudo tee -a ~/.bashrc > /dev/null && \
79+
echo "source /opt/ros/${ROS_DISTRO}/setup.bash" | sudo tee -a ~/.bashrc > /dev/null && \
80+
echo 'eval "$(register-python-argcomplete3 ros2)"' | sudo tee -a ~/.bashrc > /dev/null && \
81+
echo 'eval "$(register-python-argcomplete3 colcon)"' | sudo tee -a ~/.bashrc > /dev/null
82+
83+
84+
85+
# Install gazebo harmonic from osrf
86+
RUN sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
87+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
88+
&& sudo apt-get update \
89+
&& sudo apt-get install -y gz-harmonic \
90+
&& sudo rm -rf /var/lib/apt/lists/*
91+
92+
RUN sudo apt-get update && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic
93+
94+
RUN sudo bash -c 'wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list' \
95+
&& rosdep update \
96+
&& rosdep resolve gz-harmonic
97+
98+
WORKDIR /home/$USERNAME/gz_ros2_control_ws/src
99+
RUN git clone --depth=1 --progress --verbose https://github.com/ros-controls/gz_ros2_control -b $ROS_DISTRO . \
100+
&& export GZ_VERSION=harmonic \
101+
&& rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y --skip-keys="ros_gz_bridge ros_gz_sim"
102+
103+
WORKDIR /home/$USERNAME/gz_ros2_control_ws
104+
RUN source /opt/ros/$ROS_DISTRO/setup.bash \
105+
&& colcon build \
106+
&& echo "source ~/gz_ros2_control_ws/install/setup.bash" | sudo tee -a ~/.bashrc > /dev/null
107+
108+
RUN sudo mkdir -p /opt/nvidia/
109+
COPY NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ /opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/
110+
ENV OptiX_INSTALL_DIR=/opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/
111+
112+
WORKDIR /home/$USERNAME
113+
RUN git clone --depth=1 --progress --verbose https://github.com/RobotecAI/RGLGazeboPlugin.git \
114+
&& cd RGLGazeboPlugin \
115+
&& mkdir build && cd build \
116+
&& cmake .. && sudo make -j && sudo make install
117+
118+
# Environment variable for RGLGazeboPlugin
119+
ENV GZ_GUI_PLUGIN_PATH=/home/$USERNAME/RGLGazeboPlugin/install/RGLVisualize
120+
ENV GZ_SIM_SYSTEM_PLUGIN_PATH=/home/$USERNAME/RGLGazeboPlugin/install/RGLServerPlugin
121+
ENV RGL_PATTERNS_DIR=/home/$USERNAME/RGLGazeboPlugin/lidar_patterns

ROS2/AMD64x86/wheelchair2_base_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/CompilerInfo.cmake renamed to ROS2/AMD64x86/humble_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/CompilerInfo.cmake

File renamed without changes.

ROS2/AMD64x86/wheelchair2_base_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/ConfigCompilerFlags.cmake renamed to ROS2/AMD64x86/humble_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/ConfigCompilerFlags.cmake

File renamed without changes.

ROS2/AMD64x86/wheelchair2_base_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/CopyDLL.cmake renamed to ROS2/AMD64x86/humble_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/CopyDLL.cmake

File renamed without changes.

ROS2/AMD64x86/wheelchair2_base_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/FindCUDA.cmake renamed to ROS2/AMD64x86/humble_gazebo/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/SDK/CMake/FindCUDA.cmake

File renamed without changes.

0 commit comments

Comments
 (0)