diff --git a/.github/workflows/docker-focal.yml b/.github/workflows/docker-humble.yml similarity index 54% rename from .github/workflows/docker-focal.yml rename to .github/workflows/docker-humble.yml index bb0269e..e163aef 100644 --- a/.github/workflows/docker-focal.yml +++ b/.github/workflows/docker-humble.yml @@ -1,15 +1,15 @@ # This workflow will only build for Pull Requests which are opened, changed , merged -# that has changes in focal folder or related files -name: Docker Focal build +# that has changes in humble folder or related files +name: Docker Humble build on: pull_request: types: [opened, synchronize, reopened] paths: - '**' - - '!jammy/**' # Exclude jammy folder + - '!noetic/**' # Exclude noetic folder jobs: - # Focal 20.04 (ROS1 Noetic/ ROS2 Foxy) - docker-build-focal: + # Ubuntu 22.04 (ROS2 Humble) + docker-build-humble: uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main with: - file: ./focal/Dockerfile + file: ./humble/Dockerfile diff --git a/.github/workflows/docker-jammy.yml b/.github/workflows/docker-noetic.yml similarity index 54% rename from .github/workflows/docker-jammy.yml rename to .github/workflows/docker-noetic.yml index caa6b40..ad944a4 100644 --- a/.github/workflows/docker-jammy.yml +++ b/.github/workflows/docker-noetic.yml @@ -1,15 +1,15 @@ # This workflow will only build for Pull Requests which are opened, changed , merged -# that has changes in jammy folder or related files -name: Docker Jammy build +# that has changes in noetic folder or related files +name: Docker Noetic build on: pull_request: types: [opened, synchronize, reopened] paths: - '**' - - '!focal/**' # Exclude focal folder + - '!humble/**' # Exclude humble folder jobs: - # Jammy 22.04 (ROS2 Humble) - docker-build-jammy: + # Ubuntu 20.04 (ROS1 Noetic) + docker-build-noetic: uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main with: - file: ./jammy/Dockerfile + file: ./noetic/Dockerfile diff --git a/.github/workflows/dockerhub-focal.yml b/.github/workflows/dockerhub-humble.yml similarity index 55% rename from .github/workflows/dockerhub-focal.yml rename to .github/workflows/dockerhub-humble.yml index 8cc32c0..21d4676 100644 --- a/.github/workflows/dockerhub-focal.yml +++ b/.github/workflows/dockerhub-humble.yml @@ -1,6 +1,6 @@ -# This workflow will build and push official docker images for Focal OS when new push occurs +# This workflow will build and push official docker images for Noetic OS when new push occurs # to develop, master, release branches but doesn't run any unit test or sonar scanner -name: Docker Hub Focal build +name: Docker Hub Humble build on: push: branches: @@ -10,15 +10,15 @@ on: tags: - "carma-system-*" paths: - - '**' # Build when there are changes in focal folder or related files - - '!jammy/**' # Exclude jammy folder + - '**' # Build when there are changes in humble folder or related files + - '!noetic/**' # Exclude noetic folder jobs: - # Focal 20.04 (ROS1 Noetic/ ROS2 Foxy) - dockerhub-focal: + # Ubuntu 22.04 (ROS2 Humble) + dockerhub-humble: uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: - file: ./focal/Dockerfile - tag_name_suffix: focal \ No newline at end of file + file: ./humble/Dockerfile + tag_name_suffix: humble diff --git a/.github/workflows/dockerhub-jammy.yml b/.github/workflows/dockerhub-noetic.yml similarity index 53% rename from .github/workflows/dockerhub-jammy.yml rename to .github/workflows/dockerhub-noetic.yml index 0e1c186..56180a4 100644 --- a/.github/workflows/dockerhub-jammy.yml +++ b/.github/workflows/dockerhub-noetic.yml @@ -1,6 +1,6 @@ -# This workflow will build and push official docker images for Focal OS when new push occurs +# This workflow will build and push official docker images for Noetic OS when new push occurs # to develop, master, release branches but doesn't run any unit test or sonar scanner -name: Docker Hub Jammy build +name: Docker Hub Noetic build on: push: branches: @@ -10,15 +10,15 @@ on: tags: - "carma-system-*" paths: - - '**' # Build when there are changes in jammy folder or related files - - '!focal/**' # Exclude focal folder + - '**' # Build when there are changes in noetic folder or related files + - '!humble/**' # Exclude humble folder jobs: - # Jammy 22.04 (ROS2 Humble) - dockerhub-jammy: + # Ubuntu 20.04 (ROS1 Noetic) + dockerhub-noetic: uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} with: - file: ./jammy/Dockerfile - tag_name_suffix: jammy \ No newline at end of file + file: ./noetic/Dockerfile + tag_name_suffix: noetic diff --git a/README.md b/README.md index bb7e3e3..b60035e 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ -| Dockerhub Focal Build - Develop | Dockerhub Focal Build - Release | Dockerhub Jammy Build - Develop | Dockerhub Jammy Build - Release | +| Dockerhub Noetic Build - Develop | Dockerhub Noetic Build - Release | Dockerhub Humble Build - Develop | Dockerhub Humble Build - Release | |-------------------------------|------------------------------|------------------------------|------------------------------| -[![Focal Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-focal.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-focal.yml) | [![Focal Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-focal.yml/badge.svg?tag=carma-system-*)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-focal.yml) | [![Jammy Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-jammy.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-jammy.yml) | [![Jammy Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-jammy.yml/badge.svg?tag=carma-system-*)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-jammy.yml) +[![Noetic Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic.yml) | [![Noetic Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic.yml/badge.svg?tag=carma-system-*)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic.yml) | [![Humble Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-humble.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-humble.yml) | [![Humble Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-humble.yml/badge.svg?tag=carma-system-*)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-humble.yml) # CARMABase CARMA Base is the Docker base image for Dockerized releases and deployments of the CARMA Platform. All CARMA images should inherit from this and any dependencies of those images should be instaled in this base image to minimize system build time and final image size. -There are two CARMA Base image types. One is based on Ubuntu Focal Fossa (20.04 LTS) which supports ROS Noetic (not available on 22.04 LTS). +Currently there are two CARMA Base image types. One is based on Ubuntu Focal Fossa (20.04 LTS) which supports ROS Noetic. The other is based on Ubuntu Jammy Jellyfish (22.04 LTS) which supports ROS 2 Humble. -CARMA runs hybrid ROS1/ROS2 because some of the vehicle controller drivers are in ROS Noetic, and there is no plan to upgrade them in the foreseeable future. # CARMAPlatform The primary CARMAPlatform repository can be found [here](https://github.com/usdot-fhwa-stol/carma-platform) and is part of the [USDOT FHWA STOL](https://github.com/usdot-fhwa-stol/) diff --git a/docker/build-image.sh b/docker/build-image.sh index 4659738..5d1f787 100755 --- a/docker/build-image.sh +++ b/docker/build-image.sh @@ -16,8 +16,8 @@ USERNAME=usdotfhwastol BRANCH=$(git rev-parse --abbrev-ref HEAD) -BUILD_FOCAL=false -BUILD_JAMMY=false +BUILD_NOETIC=false +BUILD_HUMBLE=false cd "$(dirname "$0")" IMAGE=$(basename `git rev-parse --show-toplevel`) @@ -58,12 +58,12 @@ while [[ $# -gt 0 ]]; do fi shift ;; - --focal) - BUILD_FOCAL=true + --noetic) + BUILD_NOETIC=true shift ;; - --jammy) - BUILD_JAMMY=true + --humble) + BUILD_HUMBLE=true shift ;; esac @@ -98,21 +98,19 @@ TAGS=() cd .. -# If neither --focal nor --jammy is specified, build both. -if [ "$BUILD_FOCAL" = false ] && [ "$BUILD_JAMMY" = false ]; then - echo "No specific OS specified. Building both carma-base focal and jammy images" - BUILD_FOCAL=true - BUILD_JAMMY=true +if [ "$BUILD_NOETIC" = false ] && [ "$BUILD_HUMBLE" = false ]; then + BUILD_NOETIC=true + BUILD_HUMBLE=true fi -if [ "$BUILD_FOCAL" = true ]; then - echo "Building carma-base focal image" - build_image "focal/Dockerfile" "focal" +if [ "$BUILD_NOETIC" = true ]; then + echo "Building carma-base noetic image" + build_image "noetic/Dockerfile" "noetic" fi -if [ "$BUILD_JAMMY" = true ]; then - echo "Building carma-base jammy image" - build_image "jammy/Dockerfile" "jammy" +if [ "$BUILD_HUMBLE" = true ]; then + echo "Building carma-base humble image" + build_image "humble/Dockerfile" "humble" fi if [ "$PUSH" = true ]; then diff --git a/jammy/Dockerfile b/humble/Dockerfile similarity index 99% rename from jammy/Dockerfile rename to humble/Dockerfile index 0077fec..a924a58 100644 --- a/jammy/Dockerfile +++ b/humble/Dockerfile @@ -6,23 +6,7 @@ FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 ARG DEBIAN_FRONTEND="noninteractive" # Dockerfile directory relative to root -ARG DOCKERFILE_DIR="jammy" - -# Define arguments which are used in the following metadata definition -ARG BUILD_DATE="NULL" -ARG VERSION="NULL" -ARG VCS_REF="NULL" - -# Specify docker image metadata -LABEL org.label-schema.schema-version="1.0" -LABEL org.label-schema.name="carma-base" -LABEL org.label-schema.description="Base operating system install for the CARMA Platform" -LABEL org.label-schema.vendor="Leidos" -LABEL org.label-schema.version=${VERSION} -LABEL org.label-schema.url="https://highways.dot.gov/research/research-programs/operations/CARMA" -LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-base" -LABEL org.label-schema.vcs-ref=${VCS_REF} -LABEL org.label-schema.build-date=${BUILD_DATE} +ARG DOCKERFILE_DIR="humble" # Specify which platform GPUs are available inside the container ENV NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all} @@ -89,6 +73,22 @@ COPY --chown=carma ${DOCKERFILE_DIR}/package.xml /home/carma/.base-image/workspa COPY --chown=carma ./entrypoint.sh ${DOCKERFILE_DIR}/init-env.sh /home/carma/.base-image/ COPY --chown=carma ./code_coverage /home/carma/.ci-image/engineering_tools/code_coverage +# Define arguments which are used in the following metadata definition +ARG BUILD_DATE="NULL" +ARG VERSION="NULL" +ARG VCS_REF="NULL" + +# Specify docker image metadata +LABEL org.label-schema.schema-version="1.0" +LABEL org.label-schema.name="carma-base" +LABEL org.label-schema.description="Base operating system install for the CARMA Platform" +LABEL org.label-schema.vendor="Leidos" +LABEL org.label-schema.version=${VERSION} +LABEL org.label-schema.url="https://highways.dot.gov/research/research-programs/operations/CARMA" +LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-base" +LABEL org.label-schema.vcs-ref=${VCS_REF} +LABEL org.label-schema.build-date=${BUILD_DATE} + USER carma WORKDIR /home/carma diff --git a/humble/README.md b/humble/README.md new file mode 100644 index 0000000..b8e00e8 --- /dev/null +++ b/humble/README.md @@ -0,0 +1,4 @@ +# CARMABase Humble (ROS 2 Humble) +CARMA Base Humble is the Docker base image for Dockerized releases and deployments of the CARMA Platform. All CARMA images should inherit from this and any dependencies of those images should be instaled in this base image to minimize system build time and final image size. + +Currently this CARMA Base image is built on Ubuntu 22.04 LTS (Jammy Jellyfish). It supports ROS 2 Humble. \ No newline at end of file diff --git a/jammy/additional_packages.txt b/humble/additional_packages.txt similarity index 100% rename from jammy/additional_packages.txt rename to humble/additional_packages.txt diff --git a/jammy/init-env.sh b/humble/init-env.sh similarity index 100% rename from jammy/init-env.sh rename to humble/init-env.sh diff --git a/jammy/package.xml b/humble/package.xml similarity index 100% rename from jammy/package.xml rename to humble/package.xml diff --git a/jammy/ros_packages.txt b/humble/ros_packages.txt similarity index 100% rename from jammy/ros_packages.txt rename to humble/ros_packages.txt diff --git a/jammy/README.md b/jammy/README.md deleted file mode 100644 index 7081739..0000000 --- a/jammy/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# CARMABase Jammy (ROS 2 Humble) -CARMA Base Jammy is the Docker base image for Dockerized releases and deployments of the CARMA Platform. All CARMA images should inherit from this and any dependencies of those images should be instaled in this base image to minimize system build time and final image size. - -Currently this CARMA Base image is built on Ubuntu 22.04 LTS (Jammy Jellyfish). It supports ROS 2 Humble. \ No newline at end of file diff --git a/focal/CATKIN_IGNORE b/noetic/CATKIN_IGNORE similarity index 100% rename from focal/CATKIN_IGNORE rename to noetic/CATKIN_IGNORE diff --git a/focal/Dockerfile b/noetic/Dockerfile similarity index 98% rename from focal/Dockerfile rename to noetic/Dockerfile index d191678..bdf4f84 100644 --- a/focal/Dockerfile +++ b/noetic/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cudagl:11.2.0-devel-ubuntu20.04 -ARG DOCKERFILE_DIR="focal" +ARG DOCKERFILE_DIR="noetic" ENV NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all} ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics @@ -136,4 +136,4 @@ LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-base" LABEL org.label-schema.vcs-ref=${VCS_REF} LABEL org.label-schema.build-date=${BUILD_DATE} -ENTRYPOINT [ "/home/carma/.base-image/entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "/home/carma/.base-image/entrypoint.sh" ] diff --git a/focal/README.md b/noetic/README.md similarity index 92% rename from focal/README.md rename to noetic/README.md index 51da5b0..68bfbaa 100644 --- a/focal/README.md +++ b/noetic/README.md @@ -1,4 +1,4 @@ -# CARMABase Focal (ROS Noetic) +# CARMABase Noetic (ROS Noetic) CARMA Base is the Docker base image for Dockerized releases and deployments of the CARMA Platform. All CARMA images should inherit from this and any dependencies of those images should be instaled in this base image to minimize system build time and final image size. Currently this CARMA Base image is built on Ubuntu 20.04 LTS (Focal Fossa). It supports ROS Noetic. \ No newline at end of file diff --git a/focal/additional_deps.txt b/noetic/additional_deps.txt similarity index 100% rename from focal/additional_deps.txt rename to noetic/additional_deps.txt diff --git a/focal/base_deps.txt b/noetic/base_deps.txt similarity index 100% rename from focal/base_deps.txt rename to noetic/base_deps.txt diff --git a/focal/init-env.sh b/noetic/init-env.sh old mode 100755 new mode 100644 similarity index 100% rename from focal/init-env.sh rename to noetic/init-env.sh diff --git a/focal/package.xml b/noetic/package.xml similarity index 100% rename from focal/package.xml rename to noetic/package.xml diff --git a/focal/ros_deps.txt b/noetic/ros_deps.txt similarity index 100% rename from focal/ros_deps.txt rename to noetic/ros_deps.txt