-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.ros-torch
More file actions
96 lines (84 loc) · 3.82 KB
/
Copy pathDockerfile.ros-torch
File metadata and controls
96 lines (84 loc) · 3.82 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
ARG BASE_IMAGE=rwthika/ros-torch:noetic-desktop-full-torch2.1.0-v25.02
FROM ${BASE_IMAGE}
LABEL base.image=${BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
ARG ROS_DISTRO=noetic
ARG LISN_WS_DIR=/root/lisn_ws
ARG CONDA_DIR=/opt/conda
ARG RUN_BOOTSTRAP=0
ARG LISN_SKIP_FETCH=0
ARG LISN_SKIP_ROSDEP=0
ARG LISN_SKIP_LIGHTSFM_BUILD=0
ARG LISN_SKIP_BUILD=0
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 \
ROS_DISTRO=${ROS_DISTRO} \
LISN_WS_DIR=${LISN_WS_DIR} \
CONDA_DIR=${CONDA_DIR} \
PATH=${CONDA_DIR}/bin:${PATH} \
LISN_SKIP_ROSDEP=1
SHELL ["/bin/bash", "-lc"]
# Install base tooling and add the ROS apt repository with a fresh key.
RUN apt-get update --ignore-missing || apt-get update --allow-unauthenticated || true \
&& apt-get install -y --no-install-recommends git curl gnupg2 lsb-release ca-certificates \
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | gpg --dearmor -o /usr/share/keyrings/ros-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros1-latest.list
# Install required OS/ROS dependencies. Base image already ships ROS and CUDA-enabled PyTorch.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential x11-apps mesa-utils \
liblua5.1-dev liblcm-dev \
python3-vcstool python3-rosinstall-generator python3-rosinstall python3-catkin-tools\
ros-${ROS_DISTRO}-navigation \
ros-${ROS_DISTRO}-nav-core \
ros-${ROS_DISTRO}-move-base \
ros-${ROS_DISTRO}-dynamic-reconfigure \
ros-${ROS_DISTRO}-costmap-2d \
ros-${ROS_DISTRO}-pcl-ros \
ros-${ROS_DISTRO}-cv-bridge \
ros-${ROS_DISTRO}-rosbridge-server \
ros-${ROS_DISTRO}-foxglove-bridge \
ros-${ROS_DISTRO}-image-transport \
ros-${ROS_DISTRO}-message-filters \
ros-${ROS_DISTRO}-gazebo-ros \
ros-${ROS_DISTRO}-gazebo-plugins \
ros-${ROS_DISTRO}-joint-state-publisher \
ros-${ROS_DISTRO}-robot-state-publisher \
ros-${ROS_DISTRO}-xacro \
ros-${ROS_DISTRO}-tf2-geometry-msgs \
ros-${ROS_DISTRO}-geometry-msgs \
ros-${ROS_DISTRO}-tf2-sensor-msgs \
ros-${ROS_DISTRO}-costmap-converter \
ros-${ROS_DISTRO}-teb-local-planner \
ros-${ROS_DISTRO}-sensor-msgs \
ros-${ROS_DISTRO}-std-msgs \
ros-${ROS_DISTRO}-visualization-msgs \
ros-${ROS_DISTRO}-nlopt \
ros-${ROS_DISTRO}-control-box-rst \
ros-${ROS_DISTRO}-people-msgs \
&& rm -rf /var/lib/apt/lists/*
# Initialize rosdep for dependency resolution inside the image
RUN rosdep init || true && rosdep update || true
WORKDIR ${LISN_WS_DIR}
RUN mkdir -p ${LISN_WS_DIR}/src
# Copy the tvss_nav repository into the image (can be overmounted for live development)
COPY . ${LISN_WS_DIR}/src/tvss_nav
# Do not bootstrap by default; leave cloning/building to install_lisn_ws.sh at runtime.
RUN if [ "${RUN_BOOTSTRAP}" = "1" ]; then \
source /opt/ros/${ROS_DISTRO}/setup.bash; \
export LISN_WS_DIR=${LISN_WS_DIR}; \
export LISN_SKIP_FETCH=${LISN_SKIP_FETCH}; \
export LISN_SKIP_ROSDEP=${LISN_SKIP_ROSDEP}; \
export LISN_SKIP_LIGHTSFM_BUILD=${LISN_SKIP_LIGHTSFM_BUILD}; \
export LISN_SKIP_BUILD=${LISN_SKIP_BUILD}; \
bash ${LISN_WS_DIR}/src/tvss_nav/install_lisn_ws.sh; \
else \
echo "Skipping workspace bootstrap (RUN_BOOTSTRAP=0). Build at container runtime."; \
fi
# Expose standard ROS and Foxglove ports
EXPOSE 11311 8765
# Copy entrypoint and set defaults
ENV ROS_ENTRYPOINT=/usr/local/bin/ros_entrypoint.sh
COPY docker/entrypoint.sh ${ROS_ENTRYPOINT}
RUN chmod +x ${ROS_ENTRYPOINT}
ENTRYPOINT ["/usr/local/bin/ros_entrypoint.sh"]
CMD ["bash"]