Skip to content

Commit

Permalink
Merge branch 'develop' into humble-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaMN committed Oct 15, 2024
2 parents 8c624c5 + ff5ba32 commit fc7bbf9
Show file tree
Hide file tree
Showing 21 changed files with 70 additions and 73 deletions.
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 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
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 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
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 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:
Expand All @@ -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
file: ./humble/Dockerfile
tag_name_suffix: humble
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 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:
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 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
file: ./noetic/Dockerfile
tag_name_suffix: noetic
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)
Expand Down
32 changes: 15 additions & 17 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=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)
BUILD_NOETIC=true
shift
;;
--jammy)
BUILD_JAMMY=true
--humble)
BUILD_HUMBLE=true
shift
;;
esac
Expand Down Expand Up @@ -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
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/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" ]
ENTRYPOINT [ "/home/carma/.base-image/entrypoint.sh" ]
2 changes: 1 addition & 1 deletion focal/README.md → noetic/README.md
Original file line number Diff line number Diff line change
@@ -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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fc7bbf9

Please sign in to comment.