Skip to content

Commit c7ff242

Browse files
jfkellerandrewjong
authored andcommitted
modified docker files to make the sitl gps initialize faster, removed apt upgrades (#223) (#224)
1 parent afda135 commit c7ff242

File tree

3 files changed

+42
-65
lines changed

3 files changed

+42
-65
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This top-level .env file under AirStack/ defines variables that are propagated through docker-compose.yaml
22
PROJECT_NAME="airstack"
3-
PROJECT_VERSION="0.11.0"
3+
PROJECT_VERSION="0.12.0"
44
# can replace with your docker hub username
55
PROJECT_DOCKER_REGISTRY="airlab-storage.andrew.cmu.edu:5001/shared"
66
DEFAULT_ISAAC_SCENE="omniverse://airlab-storage.andrew.cmu.edu:8443/Projects/AirStack/fire_academy.scene.usd"

robot/docker/Dockerfile.robot

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime \
2121
&& dpkg-reconfigure --frontend noninteractive tzdata \
2222
&& rm -rf /var/lib/apt/lists/*
2323

24-
RUN apt-get update && apt-get -y upgrade \
24+
RUN apt-get update \
2525
&& rm -rf /var/lib/apt/lists/*
2626

2727
# Install common programs
2828
RUN apt-get update && apt-get install -y --no-install-recommends \
29+
emacs \
2930
curl \
3031
gnupg2 \
3132
lsb-release \
@@ -38,7 +39,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3839
RUN sudo add-apt-repository universe \
3940
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
4041
&& 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" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null \
41-
&& apt-get update && apt upgrade -y && apt-get install -y --no-install-recommends \
42+
&& apt-get update -y && apt-get install -y --no-install-recommends \
4243
ros-humble-desktop \
4344
python3-argcomplete \
4445
&& rm -rf /var/lib/apt/lists/*

simulation/isaac-sim/docker/Dockerfile.isaac-ros

Lines changed: 38 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,66 @@ ARG ISAAC_VERSION="4.2.0"
22
# expects context to be the root of the repository, i.e. AirStack/. this is so we can access AirStack/ros_ws/
33
FROM nvcr.io/nvidia/isaac-sim:${ISAAC_VERSION}
44
ARG ISAAC_VERSION
5-
65
WORKDIR /isaac-sim
76

7+
# isaac's ros2 launch run_isaacsim.launch.py hardcodes to search in this path, so we have to put the executables here
8+
RUN mkdir -p /root/.local/share/ov/pkg/
9+
RUN ln -s /isaac-sim /root/.local/share/ov/pkg/isaac-sim-4.2.0
810
# allows us to run isaac-sim as root
911
ENV OMNI_KIT_ALLOW_ROOT=1
1012

11-
# from https://github.com/athackst/dockerfiles/blob/main/ros2/humble.Dockerfile
12-
ENV DEBIAN_FRONTEND=noninteractive
13-
14-
# Install language
15-
RUN apt-get update && apt-get install -y \
16-
locales \
17-
&& locale-gen en_US.UTF-8 \
18-
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
19-
&& rm -rf /var/lib/apt/lists/*
20-
ENV LANG=en_US.UTF-8
13+
# setup timezone
14+
RUN echo 'Etc/UTC' > /etc/timezone && \
15+
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
16+
apt-get update && \
17+
apt-get install -q -y --no-install-recommends tzdata && \
18+
rm -rf /var/lib/apt/lists/*
2119

22-
# Install timezone
23-
RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime \
24-
&& export DEBIAN_FRONTEND=noninteractive \
25-
&& apt-get update \
26-
&& apt-get install -y tzdata \
27-
&& dpkg-reconfigure --frontend noninteractive tzdata \
28-
&& rm -rf /var/lib/apt/lists/*
29-
30-
RUN apt-get update && apt-get -y upgrade \
31-
&& rm -rf /var/lib/apt/lists/*
32-
33-
# Install common programs
34-
RUN apt-get update && apt-get install -y --no-install-recommends \
35-
curl \
20+
# install packages
21+
RUN apt-get update && apt-get install -q -y --no-install-recommends \
22+
dirmngr \
3623
gnupg2 \
37-
lsb-release \
38-
sudo \
39-
software-properties-common \
40-
wget \
24+
unzip \
25+
tmux \
4126
&& rm -rf /var/lib/apt/lists/*
4227

43-
# Install ROS2
44-
RUN sudo add-apt-repository universe \
45-
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
46-
&& 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" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null \
47-
&& apt-get update && apt upgrade -y && apt-get install -y --no-install-recommends \
48-
ros-humble-desktop \
49-
python3-argcomplete \
50-
&& rm -rf /var/lib/apt/lists/*
51-
28+
# setup keys
29+
RUN set -eux; \
30+
key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \
31+
export GNUPGHOME="$(mktemp -d)"; \
32+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
33+
mkdir -p /usr/share/keyrings; \
34+
gpg --batch --export "$key" > /usr/share/keyrings/ros2-latest-archive-keyring.gpg; \
35+
gpgconf --kill all; \
36+
rm -rf "$GNUPGHOME"
37+
38+
# setup sources.list
39+
RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2-latest.list
40+
41+
# setup environment
42+
ENV LANG=C.UTF-8
43+
ENV LC_ALL=C.UTF-8
5244
ENV ROS_DISTRO=humble
53-
ENV AMENT_PREFIX_PATH=/opt/ros/humble
54-
ENV COLCON_PREFIX_PATH=/opt/ros/humble
55-
ENV LD_LIBRARY_PATH=/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
56-
ENV PATH=/opt/ros/humble/bin:$PATH
57-
ENV PYTHONPATH=/opt/ros/humble/local/lib/python3.10/dist-packages:/opt/ros/humble/lib/python3.10/site-packages
58-
ENV ROS_PYTHON_VERSION=3
59-
ENV ROS_VERSION=2
60-
ENV ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET
61-
ENV DEBIAN_FRONTEND=
6245

63-
# ========================
64-
# Install dev tools
65-
RUN apt update && apt install -y \
66-
vim nano wget curl tree \
67-
cmake build-essential \
68-
less htop jq \
46+
# Install ROS2 packages
47+
RUN apt update && apt install -y --no-install-recommends curl emacs vim nano tmux gdb xterm tree less htop jq \
48+
cmake \
49+
git \
50+
ros-humble-desktop \
51+
ros-dev-tools \
6952
python3-pip \
7053
python3-rosdep \
71-
tmux \
72-
gdb
73-
74-
# Install any additional ROS2 packages
75-
RUN apt update -y && apt install -y \
76-
ros-dev-tools \
77-
ros-humble-mavros \
7854
ros-humble-tf2* \
55+
ros-humble-mavros \
56+
ros-humble-ackermann-msgs \
7957
ros-humble-topic-tools \
8058
ros-humble-grid-map \
8159
ros-humble-domain-bridge \
82-
ros-humble-ackermann-msgs \
8360
libcgal-dev \
8461
python3-colcon-common-extensions
8562

8663
RUN /opt/ros/humble/lib/mavros/install_geographiclib_datasets.sh
8764

88-
8965
RUN /isaac-sim/python.sh -m pip install git+https://github.com/dronekit/dronekit-python#egg=dronekit
9066
RUN pip install PyYAML mavproxy tmuxp scipy
9167

0 commit comments

Comments
 (0)