Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename trailing suffix to use ROS names #198

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/docker-focal.yml
Original file line number Diff line number Diff line change
@@ -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 noetic-foxy folder or related files
name: Docker Noetic-Foxy build
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**'
- '!jammy/**' # Exclude jammy folder
- '!humble/**' # Exclude humble folder
jobs:
# Focal 20.04 (ROS1 Noetic/ ROS2 Foxy)
docker-build-focal:
# Ubuntu 20.04 (ROS1 Noetic/ ROS2 Foxy)
docker-build-noetic-foxy:
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
with:
file: ./focal/Dockerfile
file: ./noetic-foxy/Dockerfile
12 changes: 6 additions & 6 deletions .github/workflows/docker-jammy.yml
Original file line number Diff line number Diff line change
@@ -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 humble folder or related files
name: Docker Humble build
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**'
- '!focal/**' # Exclude focal folder
- '!noetic-foxy/**' # Exclude noetic-foxy folder
jobs:
# Jammy 22.04 (ROS2 Humble)
docker-build-jammy:
# Ubuntu 22.04 (ROS2 Humble)
docker-build-humble:
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
with:
file: ./jammy/Dockerfile
file: ./humble/Dockerfile
18 changes: 9 additions & 9 deletions .github/workflows/dockerhub-focal.yml
Original file line number Diff line number Diff line change
@@ -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-Foxy 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 Noetic-Foxy build
on:
push:
branches:
Expand All @@ -10,16 +10,16 @@ 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 noetic-foxy folder or related files
- '!humble/**' # Exclude humble folder
jobs:
# Focal 20.04 (ROS1 Noetic/ ROS2 Foxy)
dockerhub-focal:
# Ubuntu 20.04 (ROS1 Noetic/ ROS2 Foxy)
dockerhub-noetic-foxy:
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
# TODO: add focal suffix when humble is migrated
#tag_name_suffix: focal https://usdot-carma.atlassian.net/browse/ARC-227
file: ./noetic-foxy/Dockerfile
# TODO: add noetic-foxy suffix when humble is migrated
#tag_name_suffix: noetic-foxy https://usdot-carma.atlassian.net/browse/ARC-227
16 changes: 8 additions & 8 deletions .github/workflows/dockerhub-jammy.yml
Original file line number Diff line number Diff line change
@@ -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-Foxy 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 Humble build
on:
push:
branches:
Expand All @@ -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 humble folder or related files
- '!noetic-foxy/**' # Exclude noetic-foxy folder
jobs:
# Jammy 22.04 (ROS2 Humble)
dockerhub-jammy:
# 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: ./jammy/Dockerfile
tag_name_suffix: jammy
file: ./humble/Dockerfile
tag_name_suffix: humble
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
| Dockerhub Focal Build - Develop | Dockerhub Focal Build - Release | Dockerhub Jammy Build - Develop | Dockerhub Jammy Build - Release |
| Dockerhub Noetic-Foxy Build - Develop | Dockerhub Noetic-Foxy 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-Foxy Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic-foxy.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic-foxy.yml) | [![Noetic-Foxy Build](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic-foxy.yml/badge.svg?tag=carma-system-*)](https://github.com/usdot-fhwa-stol/carma-base/actions/workflows/dockerhub-noetic-foxy.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.

Currently there are two CARMA Base image types. One is based on Ubuntu Focal Fossa (20.04 LTS) which supports ROS Noetic and ROS 2 Foxy.
The other is based on Ubuntu Jammy Jellyfish (22.04 LTS) which supports ROS 2 Humble.
When ROS 2 Humble is the default ROS version for the CARMA Platform, CARMA Base Focal will only be used for ROS Noetic to support hybrid deployments.
When ROS 2 Humble is the default ROS version for the CARMA Platform, CARMA Base Noetic-Foxy will only be used for ROS Noetic to support hybrid deployments.

# 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/)
Expand Down
36 changes: 18 additions & 18 deletions docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

USERNAME=usdotfhwastol
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BUILD_FOCAL=false
BUILD_JAMMY=false
BUILD_NOETIC_FOXY=false
BUILD_HUMBLE=false

cd "$(dirname "$0")"
IMAGE=$(basename `git rev-parse --show-toplevel`)
Expand Down Expand Up @@ -58,12 +58,12 @@ while [[ $# -gt 0 ]]; do
fi
shift
;;
--focal)
BUILD_FOCAL=true
--noetic-foxy)
BUILD_NOETIC_FOXY=true
shift
;;
--jammy)
BUILD_JAMMY=true
--humble)
BUILD_HUMBLE=true
shift
;;
esac
Expand Down Expand Up @@ -98,25 +98,25 @@ TAGS=()

cd ..

# If neither --focal nor --jammy is specified, build only focal for now.
# Once all humble related changes are merged into develop, jammy should be enabled.
# If neither --noetic-foxy nor --humble is specified, build only noetic-foxy for now.
# Once all humble related changes are merged into develop, humble should be enabled.
# https://usdot-carma.atlassian.net/browse/ARC-227
if [ "$BUILD_FOCAL" = false ] && [ "$BUILD_JAMMY" = false ]; then
BUILD_FOCAL=true
BUILD_JAMMY=false
if [ "$BUILD_NOETIC_FOXY" = false ] && [ "$BUILD_HUMBLE" = false ]; then
BUILD_NOETIC_FOXY=true
BUILD_HUMBLE=false
fi

# TODO, distinguish with suffix when Humble is fully integrated
# until then focal will have no suffix and be the main image
# until then noetic-foxy will have no suffix and be the main image
# https://usdot-carma.atlassian.net/browse/ARC-227
if [ "$BUILD_FOCAL" = true ]; then
echo "Building carma-base focal image"
build_image "focal/Dockerfile" "" #replace with "-focal"
if [ "$BUILD_NOETIC_FOXY" = true ]; then
echo "Building carma-base noetic-foxy image"
build_image "noetic-foxy/Dockerfile" "" #replace with just "-noetic" after ros2 is migrated to humble
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
Expand Down
34 changes: 17 additions & 17 deletions jammy/Dockerfile → humble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions humble/README.md
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions jammy/README.md

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions focal/Dockerfile → noetic-foxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
FROM nvidia/cudagl:11.2.0-devel-ubuntu20.04

# Dockerfile directory relative to root
ARG DOCKERFILE_DIR="focal"
ARG DOCKERFILE_DIR="noetic-foxy"

# Define arguments which are used in the following metadata definition
ARG BUILD_DATE="NULL"
Expand Down Expand Up @@ -205,7 +205,7 @@ RUN sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt
apt-get install --no-install-recommends --yes kvaser-canlib-dev can-utils && \
# Download a cmake module for PROJ, needed for lanelet2_extension, autoware_lanelet2_ros_interface, and maybe more
curl --output /usr/share/cmake-3.16/Modules/FindPROJ4.cmake https://raw.githubusercontent.com/mloskot/cmake-modules/master/modules/FindPROJ4.cmake && \
# Install version 45.2.0 for setuptools since that is the latest version available for ubuntu focal
# Install version 45.2.0 for setuptools since that is the latest version available for ubuntu noetic-foxy
# Version match is needed to build some of the packages
pip3 install --no-cache-dir setuptools==45.2.0 simple-pid && \
###
Expand Down
2 changes: 1 addition & 1 deletion focal/README.md → noetic-foxy/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CARMABase Focal (ROS Noetic / ROS 2 Foxy)
# CARMABase Noetic-Foxy (ROS Noetic / ROS 2 Foxy)
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 and ROS 2 Foxy.
File renamed without changes.
File renamed without changes.