-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (43 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Pull a base image
FROM ubuntu:22.04
# Update package lists
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common curl\
gnupg
# Setting up the non interactivity
ENV DEBIAN_FRONTEND noninteractive
# Setup the ROS sources
RUN add-apt-repository universe && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/nul
# Installing ROS2 image
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-humble-desktop-full
# Installing colcon
RUN apt-get install -y python3 python3-pip && \
pip install -U colcon-common-extensions
# Installing navigation packages
RUN apt install -y \
ros-humble-robot-localization \
ros-humble-joint-state-publisher \
ros-humble-navigation2 \
ros-humble-nav2-bringup
RUN apt install -y \
ros-humble-rmw-cyclonedds-cpp
ENV RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"
# Installing the Ubuntu dependencies
RUN apt-get update && apt-get install -y \
# Dev dependencies
build-essential net-tools inetutils-ping htop nano bc wget curl \
# Nvidia dependencies
mesa-utils
# Setting up nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# Setting up Gazebo models path
ENV IGN_GAZEBO_RESOURCE_PATH="/app/nemo/models"
RUN echo "source /opt/ros/humble/local_setup.bash" >> /root/.bashrc