Sfoglia il codice sorgente

Merge pull request #223 from spham-amzn/docker_remove_galactic_option

Docker remove galactic option
Steve Pham 2 anni fa
parent
commit
779e3d4e5a
2 ha cambiato i file con 7 aggiunte e 33 eliminazioni
  1. 4 20
      docker/Dockerfile
  2. 3 13
      docker/README.md

+ 4 - 20
docker/Dockerfile

@@ -4,14 +4,7 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 #
 
-# Collect the arguments for the base ros image
-ARG ROS_VERSION=humble
-ARG UBUNTU_VERSION=jammy
-
-FROM ros:${ROS_VERSION}-ros-base-${UBUNTU_VERSION}
-
-ARG ROS_VERSION
-ARG UBUNTU_VERSION
+FROM ros:humble-ros-base-jammy
 
 # Argument to control the type of docker image to build
 ARG IMAGE_TYPE=full  # Default to 'full'
@@ -34,15 +27,6 @@ ENV WORKSPACE=/data/workspace
 
 WORKDIR $WORKSPACE
 
-# Verify only the supported ROS2 versions was specified
-RUN if [ "${ROS_VERSION}" = "humble" ]; then \
-        echo "Building ROS2/Humble based image"; \
-    elif [ "${ROS_VERSION}" = "galactic" ]; then \
-        echo "Building ROS2/Galactic based image"; \
-    else \
-        echo "Unsupported ROS_VERSION: ${ROS_VERSION}" && exit 1; \
-    fi
-
 # Setup time zone and locale data (necessary for SSL and HTTPS packages)
 RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get -y \
     install \
@@ -234,9 +218,9 @@ RUN echo "[Unit]" > /etc/systemd/system/setup_ros.service \
     && echo "After=network.target" >> /etc/systemd/system/setup_ros.service \
     && echo "" >> /etc/systemd/system/setup_ros.service \
     && echo "[Service]" >> /etc/systemd/system/setup_ros.service \
-    && if [ "${ROS_VERSION}" = "humble" ]; then \
+    && if [ "${ROS_DISTRO}" = "humble" ]; then \
          echo "ExecStart=/opt/ros/humble/setup.bash" >> /etc/systemd/system/setup_ros.service; \
-       elif [ "${ROS_VERSION}" = "galactic" ]; then \
+       elif [ "${ROS_DISTRO}" = "galactic" ]; then \
          echo "ExecStart=/opt/ros/galactic/setup.bash" >> /etc/systemd/system/setup_ros.service; \
        fi \
     && echo "" >> /etc/systemd/system/setup_ros.service \
@@ -244,6 +228,6 @@ RUN echo "[Unit]" > /etc/systemd/system/setup_ros.service \
     && echo "WantedBy=default.target" >> /etc/systemd/system/setup_ros.service \
     && echo "" >> /etc/systemd/system/setup_ros.service
 
-
 ENV NVIDIA_VISIBLE_DEVICES all
 ENV NVIDIA_DRIVER_CAPABILITIES all
+

+ 3 - 13
docker/README.md

@@ -1,6 +1,6 @@
 # Dockerfile for running the ROSConDemo
 
-The dockerfile defined in this path will prepare the appropiate ROS2 package (Ubuntu 20.04/Focal Galactic or Ubuntu 22.04/Jammy + Humble) based environment and build the components necessary to run the ROSCon demo project simulator through the O3DE engine.
+The dockerfile defined in this path will prepare the appropiate ROS2 Humble distribution based environment and build the components necessary to run the ROSCon demo project simulator through the O3DE engine.
 
 ## Prerequisites
 
@@ -18,7 +18,7 @@ The dockerfile supports defining which version of Ubuntu+ROS to base the docker
 To build the docker image for the ROSConDemo environment, run the following command:
 
 ```
-docker build --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 --build-arg ROSCON_DEMO_BRANCH=development -t roscon_demo -f Dockerfile .
+docker build --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 -t roscon_demo -f Dockerfile .
 ```
 
 This will create a `roscon_demo` docker image which will used when running the container.
@@ -57,16 +57,6 @@ To launch the O3DE simulation launcher for the ROSConDemo project, execute the f
 To spawn or launch the rviz visualizer, follow the [kraken_nav README file](https://github.com/o3de/ROSConDemo/blob/development/kraken_nav/README.md#running-simulation)
 
 ## Advanced Options
-### Target ROS2 Distribution
-The Docker script defaults to building an image based on Ubuntu 22.04 (jammy) and the ROS2 Humble distribution. This can be overridden 
-with a combination if the `ROS_VERSION` and `UBUNTU_VERSION` arguments.
-
-| ROS2 Distro   | Repository                                |
-|---------------|-------------------------------------------|
-| galactic      | ROS_VERSION=galactic UBUNTU_VERSION=focal |
-| humble        | ROS_VERSION=humble UBUNTU_VERSION=jammy   |
-
-
 ### Custom source repos and branches
 
 The Dockerscripts use the following arguments to determine the repository to pull the source from. 
@@ -98,7 +88,7 @@ A slimmer docker image can be built that only contains the ROSConDemo simulation
 The Dockerfile provides arguments to build docker images that only contain the necessary files to run the O3DE simulation launcher and the navigation stack, without the need to launch the O3DE Editor. To build the the docker image for just the simulation portion of the ROSConDemo, run the following command:
 
 ```
-docker build --build-arg IMAGE_TYPE=simulation --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 --build-arg ROSCON_DEMO_BRANCH=development -t roscon_demo_simulation -f Dockerfile .
+docker build --build-arg IMAGE_TYPE=simulation --build-arg O3DE_BRANCH=199205f --build-arg O3DE_EXTRAS_BRANCH=cbd3cd5 -t roscon_demo_simulation -f Dockerfile .
 ```
 
 ## Creating a navigation stack only Docker Images.