From 40e975380ff3d10162ae8dac80607338482626cf Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 30 May 2025 14:46:01 +0530 Subject: [PATCH 01/36] allow builds on IIIT-H Wi-Fi --- ROS2/AMD64x86/humble/Dockerfile | 21 +++++++++------------ ROS2/AMD64x86/humble_gpu/Dockerfile | 21 +++++++++------------ ROS2/Jetson/humble_jetson/Dockerfile | 21 +++++++++------------ 3 files changed, 27 insertions(+), 36 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index dab8f9b..35b9d70 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -29,20 +29,17 @@ RUN echo 'Asia/Kolkata' > /etc/timezone && \ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ + curl \ + software-properties-common \ && rm -rf /var/lib/apt/lists/* -# setup keys -RUN set -eux; \ - key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - mkdir -p /usr/share/keyrings; \ - gpg --batch --export "$key" > /usr/share/keyrings/ros2-latest-archive-keyring.gpg; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" - -# setup sources.list -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 +# enable the universe repository +# info: https://help.ubuntu.com/community/Repositories/Ubuntu +RUN add-apt-repository universe + +# setup sources.list for ROS2 +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ + && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 876caec..5d3a0b2 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -29,20 +29,17 @@ RUN echo 'Asia/Kolkata' > /etc/timezone && \ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ + curl \ + software-properties-common \ && rm -rf /var/lib/apt/lists/* -# setup keys -RUN set -eux; \ - key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - mkdir -p /usr/share/keyrings; \ - gpg --batch --export "$key" > /usr/share/keyrings/ros2-latest-archive-keyring.gpg; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" - -# setup sources.list -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 +# enable the universe repository +# info: https://help.ubuntu.com/community/Repositories/Ubuntu +RUN add-apt-repository universe + +# setup sources.list for ROS2 +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ + && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 8f65d65..5bcf3d7 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -29,20 +29,17 @@ RUN echo 'Asia/Kolkata' > /etc/timezone && \ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ + curl \ + software-properties-common \ && rm -rf /var/lib/apt/lists/* -# setup keys -RUN set -eux; \ - key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - mkdir -p /usr/share/keyrings; \ - gpg --batch --export "$key" > /usr/share/keyrings/ros2-latest-archive-keyring.gpg; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" - -# setup sources.list -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 +# enable the universe repository +# info: https://help.ubuntu.com/community/Repositories/Ubuntu +RUN add-apt-repository universe + +# setup sources.list for ROS2 +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ + && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null # setup environment ENV LANG=C.UTF-8 From c1010e5a6f243db61dcda986c3ecfc7e6dc065dc Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 30 May 2025 14:47:58 +0530 Subject: [PATCH 02/36] ci-cd-builds --- .github/workflows/build-workflow.yaml | 48 ++++++ .github/workflows/build.yaml | 221 ++++++++++++++++++++++++++ 2 files changed, 269 insertions(+) create mode 100644 .github/workflows/build-workflow.yaml create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build-workflow.yaml b/.github/workflows/build-workflow.yaml new file mode 100644 index 0000000..2ceb32b --- /dev/null +++ b/.github/workflows/build-workflow.yaml @@ -0,0 +1,48 @@ +name: Build and Push Docker Image + +on: + workflow_call: + inputs: + build_context: + description: 'Path to the build context' + required: true + type: string + image_name: + description: 'Name of the Docker image' + required: true + type: string + image_version: + description: 'Version/tag for the Docker image' + required: true + type: string + +jobs: + build-and-push: + name: Build and Push Docker Image + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: ${{ inputs.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ inputs.image_name }}:${{ inputs.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..14967f6 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,221 @@ +name: Build Multi-Architecture ROS Containers + +on: + push: + branches: [ main, master ] + tags: + - 'v*' # This will trigger on any tag starting with 'v', like v1.0.0 + pull_request: + branches: [ main, master ] + +jobs: + # Detect file changes + changes: + runs-on: ubuntu-latest + outputs: + ros2-amd64: ${{ steps.filter.outputs.ros2-amd64 }} + ros2-jetson: ${{ steps.filter.outputs.ros2-jetson }} + workflow: ${{ steps.filter.outputs.workflow }} + any_changed: ${{ steps.filter.outputs.any_changed }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # fetch all history to compare with previous commits + + - name: Check for file changes + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + ros2-amd64: + - 'ROS2/AMD64x86/**' + ros2-jetson: + - 'ROS2/Jetson/**' + workflow: + - '.github/workflows/**' + any_changed: + - 'ROS2/**' + - '.github/workflows/**' + + # Stage 1: ROS2 base humble images (AMD64/x86) + ros2-humble-base: + needs: changes + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Base Images + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: 'latest' } + - { build_context: './ROS2/AMD64x86/humble_gpu', image_name: 'humble_gpu', image_version: 'latest' } + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.config.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + + # Stage 1: ROS2 base humble images (Jetson/ARM) + ros2-humble-jetson: + needs: changes + if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Jetson Base + runs-on: ubuntu-24.04-arm + permissions: + contents: read + packages: write + strategy: + matrix: + config: + - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: 'latest' } + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.config.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + + # Stage 2: ROS2 humble_harmonic (depends on base humble) + ros2-humble-harmonic: + needs: [changes, ros2-humble-base] + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Harmonic + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/humble_harmonic', image_name: 'humble_harmonic', image_version: 'latest' } + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.config.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + + # Stage 3: ROS2 wheelchair2_base images (AMD64/x86) + ros2-wheelchair-base: + needs: [changes, ros2-humble-base, ros2-humble-harmonic] + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Wheelchair2 Base Images + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: 'latest' } + - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: 'latest' } + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.config.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + + # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) + ros2-wheelchair-jetson: + needs: [changes, ros2-humble-jetson] + if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Wheelchair2 Jetson Images + runs-on: ubuntu-24.04-arm + permissions: + contents: read + packages: write + strategy: + matrix: + config: + - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: 'latest' } + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ${{ matrix.config.build_context }} + push: true + tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} + labels: | + org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} \ No newline at end of file From d6c501f81406b0340dff89c1873d1503f24d620c Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 30 May 2025 14:49:41 +0530 Subject: [PATCH 03/36] use `$ROS_DISTRO` --- ROS2/AMD64x86/humble_harmonic/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index 7fae0ef..395584b 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -19,4 +19,4 @@ RUN sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/ && sudo apt-get install -y gz-harmonic \ && sudo rm -rf /var/lib/apt/lists/* -RUN sudo apt-get update && sudo apt-get install -y ros-humble-ros-gzharmonic \ No newline at end of file +RUN sudo apt-get update && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 8a5f8bb..f2bf36a 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -61,12 +61,12 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* WORKDIR /home/wheelchair2/gz_ros2_control_ws/src -RUN git clone https://github.com/ros-controls/gz_ros2_control -b humble . \ +RUN git clone https://github.com/ros-controls/gz_ros2_control -b $ROS_DISTRO . \ && export GZ_VERSION=harmonic \ && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y --skip-keys="ros_gz_bridge ros_gz_sim" WORKDIR /home/wheelchair2/gz_ros2_control_ws -RUN source /opt/ros/humble/setup.bash \ +RUN source /opt/ros/$ROS_DISTRO/setup.bash \ && colcon build \ && echo "source ~/gz_ros2_control_ws/install/setup.bash" | sudo tee -a ~/.bashrc > /dev/null From 9b8230d97cc089490c0a199bb4de32974c3d1a2e Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 30 May 2025 14:56:07 +0530 Subject: [PATCH 04/36] proper sequence of workflows --- .github/workflows/build-workflow.yaml | 7 +- .github/workflows/build.yaml | 168 ++++++-------------------- 2 files changed, 40 insertions(+), 135 deletions(-) diff --git a/.github/workflows/build-workflow.yaml b/.github/workflows/build-workflow.yaml index 2ceb32b..d18ef39 100644 --- a/.github/workflows/build-workflow.yaml +++ b/.github/workflows/build-workflow.yaml @@ -15,11 +15,16 @@ on: description: 'Version/tag for the Docker image' required: true type: string + runs_on: + description: 'The type of runner to use' + required: false + type: string + default: 'ubuntu-latest' jobs: build-and-push: name: Build and Push Docker Image - runs-on: ubuntu-latest + runs-on: ${{ inputs.runs_on }} permissions: contents: read packages: write diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 14967f6..792924c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,183 +39,83 @@ jobs: - '.github/workflows/**' # Stage 1: ROS2 base humble images (AMD64/x86) - ros2-humble-base: + ros2-humble-base-amd64: needs: changes if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} - name: ROS2 Humble Base Images - runs-on: ubuntu-latest - permissions: - contents: read - packages: write + name: ROS2 Humble Base Images (AMD64) strategy: matrix: config: - { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: 'latest' } - { build_context: './ROS2/AMD64x86/humble_gpu', image_name: 'humble_gpu', image_version: 'latest' } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.config.build_context }} - push: true - tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} - labels: | - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest # Stage 1: ROS2 base humble images (Jetson/ARM) ros2-humble-jetson: needs: changes if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Humble Jetson Base - runs-on: ubuntu-24.04-arm - permissions: - contents: read - packages: write strategy: matrix: config: - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: 'latest' } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.config.build_context }} - push: true - tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} - labels: | - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-24.04-arm # Stage 2: ROS2 humble_harmonic (depends on base humble) ros2-humble-harmonic: - needs: [changes, ros2-humble-base] + needs: [changes, ros2-humble-base-amd64] if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Humble Harmonic - runs-on: ubuntu-latest - permissions: - contents: read - packages: write strategy: matrix: config: - { build_context: './ROS2/AMD64x86/humble_harmonic', image_name: 'humble_harmonic', image_version: 'latest' } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.config.build_context }} - push: true - tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} - labels: | - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest # Stage 3: ROS2 wheelchair2_base images (AMD64/x86) ros2-wheelchair-base: - needs: [changes, ros2-humble-base, ros2-humble-harmonic] + needs: [changes, ros2-humble-base-amd64, ros2-humble-harmonic] if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Wheelchair2 Base Images - runs-on: ubuntu-latest - permissions: - contents: read - packages: write strategy: matrix: config: - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: 'latest' } - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: 'latest' } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.config.build_context }} - push: true - tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} - labels: | - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) ros2-wheelchair-jetson: needs: [changes, ros2-humble-jetson] if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Wheelchair2 Jetson Images - runs-on: ubuntu-24.04-arm - permissions: - contents: read - packages: write strategy: matrix: config: - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: 'latest' } - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ${{ matrix.config.build_context }} - push: true - tags: ghcr.io/wheelchair2/${{ matrix.config.image_name }}:${{ matrix.config.image_version }} - labels: | - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} \ No newline at end of file + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-24.04-arm \ No newline at end of file From 00648550fb01f157b1320f07d0955c0df76607b8 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sat, 31 May 2025 11:13:01 +0530 Subject: [PATCH 05/36] add dynamic image versioning and make it user-agnostic --- .github/workflows/build-workflow.yaml | 5 ++++- .github/workflows/build.yaml | 26 +++++++++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-workflow.yaml b/.github/workflows/build-workflow.yaml index d18ef39..7eb292f 100644 --- a/.github/workflows/build-workflow.yaml +++ b/.github/workflows/build-workflow.yaml @@ -30,6 +30,9 @@ jobs: packages: write steps: + - name: Set up GitHub Actions environment + run: echo "GITHUB_ACTOR_LOWER=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + - name: Checkout repository uses: actions/checkout@v4 @@ -48,6 +51,6 @@ jobs: with: context: ${{ inputs.build_context }} push: true - tags: ghcr.io/wheelchair2/${{ inputs.image_name }}:${{ inputs.image_version }} + tags: ghcr.io/${{ env.GITHUB_ACTOR_LOWER }}/${{ inputs.image_name }}:${{ inputs.image_version }} labels: | org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 792924c..d41cc69 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,6 +17,7 @@ jobs: ros2-jetson: ${{ steps.filter.outputs.ros2-jetson }} workflow: ${{ steps.filter.outputs.workflow }} any_changed: ${{ steps.filter.outputs.any_changed }} + image_version: ${{ steps.set_version.outputs.image_version }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -38,6 +39,17 @@ jobs: - 'ROS2/**' - '.github/workflows/**' + - name: Set image version + id: set_version + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "image_version=test" >> $GITHUB_OUTPUT + elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/v* ]]; then + echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT + else + echo "image_version=latest" >> $GITHUB_OUTPUT + fi + # Stage 1: ROS2 base humble images (AMD64/x86) ros2-humble-base-amd64: needs: changes @@ -46,8 +58,8 @@ jobs: strategy: matrix: config: - - { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: 'latest' } - - { build_context: './ROS2/AMD64x86/humble_gpu', image_name: 'humble_gpu', image_version: 'latest' } + - { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/humble_gpu', image_name: 'humble_gpu', image_version: "${{ needs.changes.outputs.image_version }}" } uses: ./.github/workflows/build-workflow.yaml with: build_context: ${{ matrix.config.build_context }} @@ -63,7 +75,7 @@ jobs: strategy: matrix: config: - - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: 'latest' } + - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } uses: ./.github/workflows/build-workflow.yaml with: build_context: ${{ matrix.config.build_context }} @@ -79,7 +91,7 @@ jobs: strategy: matrix: config: - - { build_context: './ROS2/AMD64x86/humble_harmonic', image_name: 'humble_harmonic', image_version: 'latest' } + - { build_context: './ROS2/AMD64x86/humble_harmonic', image_name: 'humble_harmonic', image_version: "${{ needs.changes.outputs.image_version }}" } uses: ./.github/workflows/build-workflow.yaml with: build_context: ${{ matrix.config.build_context }} @@ -95,8 +107,8 @@ jobs: strategy: matrix: config: - - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: 'latest' } - - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: 'latest' } + - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: "${{ needs.changes.outputs.image_version }}" } uses: ./.github/workflows/build-workflow.yaml with: build_context: ${{ matrix.config.build_context }} @@ -112,7 +124,7 @@ jobs: strategy: matrix: config: - - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: 'latest' } + - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } uses: ./.github/workflows/build-workflow.yaml with: build_context: ${{ matrix.config.build_context }} From 900040bc3ba496a97b83590138599ec5b9af1ec0 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 1 Jun 2025 12:29:34 +0530 Subject: [PATCH 06/36] test new perms --- .github/workflows/build.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d41cc69..59c6296 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,6 +18,11 @@ jobs: workflow: ${{ steps.filter.outputs.workflow }} any_changed: ${{ steps.filter.outputs.any_changed }} image_version: ${{ steps.set_version.outputs.image_version }} + permissions: + packages: write + contents: read + pull-requests: write + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -55,6 +60,9 @@ jobs: needs: changes if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Humble Base Images (AMD64) + permissions: + packages: write + contents: read strategy: matrix: config: @@ -72,6 +80,9 @@ jobs: needs: changes if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Humble Jetson Base + permissions: + packages: write + contents: read strategy: matrix: config: @@ -88,6 +99,9 @@ jobs: needs: [changes, ros2-humble-base-amd64] if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Humble Harmonic + permissions: + packages: write + contents: read strategy: matrix: config: @@ -104,6 +118,9 @@ jobs: needs: [changes, ros2-humble-base-amd64, ros2-humble-harmonic] if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Wheelchair2 Base Images + permissions: + packages: write + contents: read strategy: matrix: config: @@ -121,6 +138,9 @@ jobs: needs: [changes, ros2-humble-jetson] if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} name: ROS2 Wheelchair2 Jetson Images + permissions: + packages: write + contents: read strategy: matrix: config: From aaed0688074471a9be67f76b8b31254f50e582d2 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 1 Jun 2025 12:38:46 +0530 Subject: [PATCH 07/36] use owner --- .github/workflows/build-workflow.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-workflow.yaml b/.github/workflows/build-workflow.yaml index 7eb292f..1553a07 100644 --- a/.github/workflows/build-workflow.yaml +++ b/.github/workflows/build-workflow.yaml @@ -31,7 +31,7 @@ jobs: steps: - name: Set up GitHub Actions environment - run: echo "GITHUB_ACTOR_LOWER=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + run: echo "GITHUB_OWNER_LOWER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - name: Checkout repository uses: actions/checkout@v4 @@ -51,6 +51,6 @@ jobs: with: context: ${{ inputs.build_context }} push: true - tags: ghcr.io/${{ env.GITHUB_ACTOR_LOWER }}/${{ inputs.image_name }}:${{ inputs.image_version }} + tags: ghcr.io/${{ env.GITHUB_OWNER_LOWER }}/${{ inputs.image_name }}:${{ inputs.image_version }} labels: | org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} \ No newline at end of file From da28b1cfa02643a11fde5c79ae7b62fe4c2834a5 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 1 Jun 2025 12:45:28 +0530 Subject: [PATCH 08/36] allow release info change --- ROS2/AMD64x86/humble/Dockerfile | 4 ++-- ROS2/AMD64x86/humble_gpu/Dockerfile | 4 ++-- ROS2/AMD64x86/humble_harmonic/Dockerfile | 4 ++-- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 2 +- ROS2/Jetson/humble_jetson/Dockerfile | 2 +- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index 35b9d70..c21885a 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* @@ -67,7 +67,7 @@ COPY ./ros_entrypoint.sh / ENTRYPOINT ["/ros_entrypoint.sh"] # install bootstrap tools -RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install --no-install-recommends -y \ build-essential \ git \ bash-completion \ diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 5d3a0b2..a1ec709 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* @@ -67,7 +67,7 @@ COPY ./ros_entrypoint.sh / ENTRYPOINT ["/ros_entrypoint.sh"] # install bootstrap tools -RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update --allow-releaseinfo-change&& sudo apt-get install --no-install-recommends -y \ build-essential \ git \ bash-completion \ diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index 395584b..711c5cc 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -5,7 +5,7 @@ FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:latest ENV GZ_VERSION=harmonic # install necessary tools -RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install --no-install-recommends -y \ curl \ lsb-release \ wget \ @@ -19,4 +19,4 @@ RUN sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/ && sudo apt-get install -y gz-harmonic \ && sudo rm -rf /var/lib/apt/lists/* -RUN sudo apt-get update && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic \ No newline at end of file +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index d75468b..69a4a5b 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get update \ +RUN sudo apt-get --allow-releaseinfo-change update \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index f2bf36a..be7e6ee 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get update \ +RUN sudo apt-get --allow-releaseinfo-change update \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 5bcf3d7..2004b32 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index 1074809..1b146fe 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get update \ +RUN sudo apt-get update --allow-releaseinfo-change \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ From f93c137a4290e51d7977f826971d2565777ed00a Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:10:30 +0530 Subject: [PATCH 09/36] test with humble image --- ROS2/AMD64x86/humble/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index c21885a..dcda07a 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -37,9 +37,14 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ # info: https://help.ubuntu.com/community/Repositories/Ubuntu RUN add-apt-repository universe -# setup sources.list for ROS2 -RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ - && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +# Setup the ROS 2 apt repository +# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources +# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 +# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 +RUN apt update && sudo apt install curl -y \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ + && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ + && sudo install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 From 10dd85a6cb8ba39942fd77ef4f926c4db660e075 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:12:49 +0530 Subject: [PATCH 10/36] gpu image is annoying. it must also be changed --- ROS2/AMD64x86/humble_gpu/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index a1ec709..82937fc 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -37,9 +37,14 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ # info: https://help.ubuntu.com/community/Repositories/Ubuntu RUN add-apt-repository universe -# setup sources.list for ROS2 -RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ - && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +# Setup the ROS 2 apt repository +# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources +# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 +# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 +RUN apt update && sudo apt install curl -y \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ + && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ + && sudo install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 From e9e3fbd10da2f1ea79de3dc65f3e2686ecc94646 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:14:50 +0530 Subject: [PATCH 11/36] oops sudo --- ROS2/AMD64x86/humble/Dockerfile | 4 ++-- ROS2/AMD64x86/humble_gpu/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index dcda07a..b92b8b2 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -41,10 +41,10 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update && sudo apt install curl -y \ +RUN apt update && apt install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && sudo install /tmp/ros2-apt-source.deb + && install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 82937fc..3dc2cbd 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -41,10 +41,10 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update && sudo apt install curl -y \ +RUN apt update && apt install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && sudo install /tmp/ros2-apt-source.deb + && install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 From 4bbf1847a194f52525ca8973bbc24eee9acc9d69 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:17:07 +0530 Subject: [PATCH 12/36] `"` in the wrong place --- ROS2/AMD64x86/humble/Dockerfile | 2 +- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index b92b8b2..28259a2 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -42,7 +42,7 @@ RUN add-apt-repository universe # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 RUN apt update && apt install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 3dc2cbd..c2ae36f 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -42,7 +42,7 @@ RUN add-apt-repository universe # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 RUN apt update && apt install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \" \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb From 649784de5a861b98f5e43107c800e71a4f242993 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:19:06 +0530 Subject: [PATCH 13/36] `--allow-releaseinfo-change` --- ROS2/AMD64x86/humble/Dockerfile | 2 +- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index 28259a2..ec37fcb 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -41,7 +41,7 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update && apt install curl -y \ +RUN apt update --allow-releaseinfo-change && apt install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index c2ae36f..b6ffac9 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -41,7 +41,7 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update && apt install curl -y \ +RUN apt update --allow-releaseinfo-change && apt install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb From d81459bd3a7a71f7c5b48559972eb8179fad6010 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:23:03 +0530 Subject: [PATCH 14/36] no `\"`? --- ROS2/AMD64x86/humble/Dockerfile | 2 +- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index ec37fcb..249fa46 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -42,7 +42,7 @@ RUN add-apt-repository universe # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 RUN apt update --allow-releaseinfo-change && apt install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index b6ffac9..c8176b6 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -42,7 +42,7 @@ RUN add-apt-repository universe # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 RUN apt update --allow-releaseinfo-change && apt install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}' \") \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ && install /tmp/ros2-apt-source.deb From f47e8a9ba7457face1ca600edaeb38cb76cc3bda Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:30:19 +0530 Subject: [PATCH 15/36] apt, apt-get? --- ROS2/AMD64x86/humble/Dockerfile | 4 ++-- ROS2/AMD64x86/humble_gpu/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index 249fa46..e7a4d02 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -41,10 +41,10 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update --allow-releaseinfo-change && apt install curl -y \ +RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && install /tmp/ros2-apt-source.deb + && apt-get install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index c8176b6..796f2d4 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -41,10 +41,10 @@ RUN add-apt-repository universe # Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources # Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 # Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt update --allow-releaseinfo-change && apt install curl -y \ +RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && install /tmp/ros2-apt-source.deb + && apt-get install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 From 09fe9936c07c692dabbd521b3a2753b5d12aa681 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:57:41 +0530 Subject: [PATCH 16/36] use testing --- ROS2/AMD64x86/humble_harmonic/Dockerfile | 3 +-- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 2 +- ROS2/Jetson/humble_jetson/Dockerfile | 11 ++++++++--- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index 711c5cc..c67bd41 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -1,5 +1,4 @@ - -FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:latest +FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:testing # Environment setup ENV GZ_VERSION=harmonic diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index 69a4a5b..3169477 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble:latest +FROM ghcr.io/smart-wheelchair-rrc/humble:testing # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index be7e6ee..7c63178 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:latest +FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:testing # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 2004b32..7ad7aeb 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -37,9 +37,14 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ # info: https://help.ubuntu.com/community/Repositories/Ubuntu RUN add-apt-repository universe -# setup sources.list for ROS2 -RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ - && 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" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +# Setup the ROS 2 apt repository +# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources +# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 +# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 +RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ + && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ + && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ + && apt-get install /tmp/ros2-apt-source.deb # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index 1b146fe..d760154 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:latest +FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:testing ARG USERNAME=container_user From 8ca849a04cf37e423a4b73cc9a0bd1ebebcdb722 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 16:58:21 +0530 Subject: [PATCH 17/36] typo --- ROS2/AMD64x86/humble_harmonic/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 2 +- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index c67bd41..6134cb1 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:testing +FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:test # Environment setup ENV GZ_VERSION=harmonic diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index 3169477..614b926 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble:testing +FROM ghcr.io/smart-wheelchair-rrc/humble:test # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 7c63178..318fcdc 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:testing +FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:test # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index d760154..eeba2a9 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:testing +FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:test ARG USERNAME=container_user From 0313e9b91e22c44cb893d5696b1ba7ac326d6962 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 2 Jun 2025 17:55:03 +0530 Subject: [PATCH 18/36] comment out jetson stuff --- .github/workflows/build.yaml | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 59c6296..4ea91ff 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,13 +36,13 @@ jobs: filters: | ros2-amd64: - 'ROS2/AMD64x86/**' - ros2-jetson: - - 'ROS2/Jetson/**' workflow: - '.github/workflows/**' any_changed: - 'ROS2/**' - '.github/workflows/**' +# ros2-jetson: +# - 'ROS2/Jetson/**' - name: Set image version id: set_version @@ -76,23 +76,23 @@ jobs: runs_on: ubuntu-latest # Stage 1: ROS2 base humble images (Jetson/ARM) - ros2-humble-jetson: - needs: changes - if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - name: ROS2 Humble Jetson Base - permissions: - packages: write - contents: read - strategy: - matrix: - config: - - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - uses: ./.github/workflows/build-workflow.yaml - with: - build_context: ${{ matrix.config.build_context }} - image_name: ${{ matrix.config.image_name }} - image_version: ${{ matrix.config.image_version }} - runs_on: ubuntu-24.04-arm + # ros2-humble-jetson: + # needs: changes + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Humble Jetson Base + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm # Stage 2: ROS2 humble_harmonic (depends on base humble) ros2-humble-harmonic: @@ -134,20 +134,20 @@ jobs: runs_on: ubuntu-latest # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) - ros2-wheelchair-jetson: - needs: [changes, ros2-humble-jetson] - if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - name: ROS2 Wheelchair2 Jetson Images - permissions: - packages: write - contents: read - strategy: - matrix: - config: - - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - uses: ./.github/workflows/build-workflow.yaml - with: - build_context: ${{ matrix.config.build_context }} - image_name: ${{ matrix.config.image_name }} - image_version: ${{ matrix.config.image_version }} - runs_on: ubuntu-24.04-arm \ No newline at end of file + # ros2-wheelchair-jetson: + # needs: [changes, ros2-humble-jetson] + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Wheelchair2 Jetson Images + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm \ No newline at end of file From 0092dc1337feffe4f63128ec9d6caf7f29d39a06 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 6 Jun 2025 12:59:13 +0530 Subject: [PATCH 19/36] tarun's update according to OSRF --- ROS2/AMD64x86/humble/Dockerfile | 21 +++++++------------ ROS2/AMD64x86/humble_gpu/Dockerfile | 21 +++++++------------ ROS2/AMD64x86/humble_harmonic/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 +- .../wheelchair2_base_gazebo/Dockerfile | 2 +- ROS2/Jetson/humble_jetson/Dockerfile | 21 +++++++------------ .../Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 7 files changed, 28 insertions(+), 43 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index e7a4d02..433e2a7 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -30,21 +30,16 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ curl \ - software-properties-common \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* -# enable the universe repository -# info: https://help.ubuntu.com/community/Repositories/Ubuntu -RUN add-apt-repository universe - -# Setup the ROS 2 apt repository -# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources -# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 -# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ - && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && apt-get install /tmp/ros2-apt-source.deb +# Setup ROS Apt sources +RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \ + && echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \ + && apt-get update \ + && apt-get install /tmp/ros2-apt-source.deb \ + && rm -f /tmp/ros2-apt-source.deb \ + && rm -rf /var/lib/apt/lists/* # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 796f2d4..fdbe8c6 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -30,21 +30,16 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ curl \ - software-properties-common \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* -# enable the universe repository -# info: https://help.ubuntu.com/community/Repositories/Ubuntu -RUN add-apt-repository universe - -# Setup the ROS 2 apt repository -# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources -# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 -# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ - && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && apt-get install /tmp/ros2-apt-source.deb +# Setup ROS Apt sources +RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \ + && echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \ + && apt-get update \ + && apt-get install /tmp/ros2-apt-source.deb \ + && rm -f /tmp/ros2-apt-source.deb \ + && rm -rf /var/lib/apt/lists/* # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index 6134cb1..d636bcb 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:test +FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:v3.0 # Environment setup ENV GZ_VERSION=harmonic diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index 614b926..3dfd23a 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble:test +FROM ghcr.io/smart-wheelchair-rrc/humble:v3.0 # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 318fcdc..5d689b5 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:test +FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:v3.0 # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index 7ad7aeb..bb65245 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -30,21 +30,16 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ dirmngr \ gnupg2 \ curl \ - software-properties-common \ + ca-certificates \ && rm -rf /var/lib/apt/lists/* -# enable the universe repository -# info: https://help.ubuntu.com/community/Repositories/Ubuntu -RUN add-apt-repository universe - -# Setup the ROS 2 apt repository -# Guidance source 1: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html#setup-sources -# Guidance source 2: https://discourse.ros.org/t/ros-signing-key-migration-guide/43937 -# Guidance source 3: https://github.com/osrf/docker_images/commit/13a4d90a845353eb95146b9c016b8fd933e272e0 -RUN apt-get update --allow-releaseinfo-change && apt-get install curl -y \ - && export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') \ - && curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" \ - && apt-get install /tmp/ros2-apt-source.deb +# Setup ROS Apt sources +RUN curl -L -s -o /tmp/ros2-apt-source.deb https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros2-apt-source_1.1.0.jammy_all.deb \ + && echo "1600cb8cc28258a39bffc1736a75bcbf52d1f2db371a4d020c1b187d2a5a083b /tmp/ros2-apt-source.deb" | sha256sum --strict --check \ + && apt-get update \ + && apt-get install /tmp/ros2-apt-source.deb \ + && rm -f /tmp/ros2-apt-source.deb \ + && rm -rf /var/lib/apt/lists/* # setup environment ENV LANG=C.UTF-8 diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index eeba2a9..2caaf7e 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:test +FROM ghcr.io/smart-wheelchair-rrc/humble_jetson:v3.0 ARG USERNAME=container_user From a5292ff78e1d584e4a28e3584b7235d2921bc366 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Fri, 6 Jun 2025 13:02:08 +0530 Subject: [PATCH 20/36] use tags always --- .github/workflows/build.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4ea91ff..2b7c1d3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,12 +47,8 @@ jobs: - name: Set image version id: set_version run: | - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "image_version=test" >> $GITHUB_OUTPUT - elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/v* ]]; then + if [[ "${{ github.ref }}" == refs/tags/v* ]]; then echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT - else - echo "image_version=latest" >> $GITHUB_OUTPUT fi # Stage 1: ROS2 base humble images (AMD64/x86) From b9b6ae84190f7f0bf66306266a625660ab51db7f Mon Sep 17 00:00:00 2001 From: eccentricOrange Date: Fri, 6 Jun 2025 13:46:33 +0530 Subject: [PATCH 21/36] disallow releaseinfo change --- ROS2/AMD64x86/humble/Dockerfile | 4 ++-- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- ROS2/AMD64x86/humble_harmonic/Dockerfile | 4 ++-- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 2 +- ROS2/Jetson/humble_jetson/Dockerfile | 2 +- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index 433e2a7..ddb5820 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* @@ -67,7 +67,7 @@ COPY ./ros_entrypoint.sh / ENTRYPOINT ["/ros_entrypoint.sh"] # install bootstrap tools -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ build-essential \ git \ bash-completion \ diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index fdbe8c6..a4a8ac2 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index d636bcb..506dee3 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -4,7 +4,7 @@ FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:v3.0 ENV GZ_VERSION=harmonic # install necessary tools -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ curl \ lsb-release \ wget \ @@ -18,4 +18,4 @@ RUN sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/ && sudo apt-get install -y gz-harmonic \ && sudo rm -rf /var/lib/apt/lists/* -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic \ No newline at end of file +RUN sudo apt-get update && sudo apt-get install -y ros-$ROS_DISTRO-ros-gzharmonic \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index 3dfd23a..a4955f3 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get --allow-releaseinfo-change update \ +RUN sudo apt-get update \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 5d689b5..8152f45 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get --allow-releaseinfo-change update \ +RUN sudo apt-get update \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ diff --git a/ROS2/Jetson/humble_jetson/Dockerfile b/ROS2/Jetson/humble_jetson/Dockerfile index bb65245..14a4702 100644 --- a/ROS2/Jetson/humble_jetson/Dockerfile +++ b/ROS2/Jetson/humble_jetson/Dockerfile @@ -57,7 +57,7 @@ USER $USERNAME ENV ROS_DISTRO=$ROS_DISTRO # install ros2 packages -RUN sudo apt-get update --allow-releaseinfo-change && sudo apt-get install -y --no-install-recommends \ +RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ros-$ROS_DISTRO-desktop \ && sudo rm -rf /var/lib/apt/lists/* diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index 2caaf7e..cc12ba3 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.licenses="MIT" SHELL ["/bin/bash", "-c"] # Install Basic deps -RUN sudo apt-get update --allow-releaseinfo-change \ +RUN sudo apt-get update \ && sudo apt-get -y install --no-install-recommends\ libssl-dev \ libusb-1.0-0-dev \ From 4afc6b4601159a4801853cf56e65e329f31d7f7f Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sat, 7 Jun 2025 16:59:08 +0530 Subject: [PATCH 22/36] run for tags only. but tags anywhere --- .github/workflows/build.yaml | 75 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2b7c1d3..38d9cb7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,11 +2,10 @@ name: Build Multi-Architecture ROS Containers on: push: - branches: [ main, master ] tags: - - 'v*' # This will trigger on any tag starting with 'v', like v1.0.0 - pull_request: - branches: [ main, master ] + - 'v*' + - 'rc*' + - 'latest' jobs: # Detect file changes @@ -72,23 +71,23 @@ jobs: runs_on: ubuntu-latest # Stage 1: ROS2 base humble images (Jetson/ARM) - # ros2-humble-jetson: - # needs: changes - # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - # name: ROS2 Humble Jetson Base - # permissions: - # packages: write - # contents: read - # strategy: - # matrix: - # config: - # - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - # uses: ./.github/workflows/build-workflow.yaml - # with: - # build_context: ${{ matrix.config.build_context }} - # image_name: ${{ matrix.config.image_name }} - # image_version: ${{ matrix.config.image_version }} - # runs_on: ubuntu-24.04-arm + ros2-humble-jetson: + needs: changes + if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Jetson Base + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-24.04-arm # Stage 2: ROS2 humble_harmonic (depends on base humble) ros2-humble-harmonic: @@ -130,20 +129,20 @@ jobs: runs_on: ubuntu-latest # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) - # ros2-wheelchair-jetson: - # needs: [changes, ros2-humble-jetson] - # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - # name: ROS2 Wheelchair2 Jetson Images - # permissions: - # packages: write - # contents: read - # strategy: - # matrix: - # config: - # - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - # uses: ./.github/workflows/build-workflow.yaml - # with: - # build_context: ${{ matrix.config.build_context }} - # image_name: ${{ matrix.config.image_name }} - # image_version: ${{ matrix.config.image_version }} - # runs_on: ubuntu-24.04-arm \ No newline at end of file + ros2-wheelchair-jetson: + needs: [changes, ros2-humble-jetson] + if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Wheelchair2 Jetson Images + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-24.04-arm \ No newline at end of file From b585292fd3833a6f276d1bfd9c5338ccdfa85fd7 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 8 Jun 2025 12:11:42 +0530 Subject: [PATCH 23/36] Main README updates --- .github/workflows/README.md | 1 + README.md | 157 +++++++++++++++++++++++++----------- 2 files changed, 109 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 0000000..afa5120 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1 @@ +# Understanding the CI/CD workflows \ No newline at end of file diff --git a/README.md b/README.md index 7423041..c96404c 100644 --- a/README.md +++ b/README.md @@ -1,85 +1,144 @@ -# Docker For ROS Development -Docker images for Easy ROS1 and ROS2 development with the wheelchair. +# Docker for ROS Development -## Available Images +This repository provides ROS1 and ROS2 Docker images for easy development with the wheelchair. -The following Docker images are available: +This documentation is split into four parts: -- `humble`: Based on `ubuntu:jammy`, this image includes ROS 2 Humble Hawksbill packages and a non-root user for enhanced security. -- `humble_gpu`: Based on `nvidia/cuda:12.2.2-devel-ubuntu22.04`, this image includes ROS 2 Humble Hawksbill packages, CUDA, CuDNN and a non-root user for enhanced security. -- `humble_harmonic`: Extends the `humble_gpu` image and includes Gazebo Harmonic, which works better with `humble-gz_sim` related deps. Hence this is **Recommended** over `fortress`. -- `wheelchair2_base`: Extends the `humble` image and includes Realsense and Livox SDK's -- `humble_jetson`: Based on `ubuntu:jammy for ARM64`, this image includes ROS 2 Humble Hawksbill packages and a non-root user for enhanced security. -- `wheelchair2_base_jetson`: Extends the `humble_jetson` image and includes Realsense and Livox SDK's -- `wheelchair2_base_gazebo`: Extends `humble_harmonic` image and includes `ros2_control`, `RGLGazeboPlugin`, `Nvidia Optix` for gz-sim and Realsense and Livox SDK's for real-world runs. +- [List of features and images](#list-of-ros2-features-and-images) +- [Instructions for everyone (GHCR authentication)](#authenticating-to-github-container-registry) +- [How to use an image](#pulling-an-image) +- [How to build an image](#building-an-image) -**Important Note:** The `ROS1` images are currently **under development** and have not been heavily tested. They may be unstable or contain significant bugs. - -## Usage +> [!NOTE] +> This repository uses GitHub Actions for CI/CD. Further documentation on this is available in the [CI/CD documentation](/.github/workflows/README.md). -### 1. Pulling an Image +## List of ROS2 Features and Images + +| Image name | Base image | Intended target | Features | +| --- | --- | --- | --- | +| `humble` | [`ubuntu:jammy`](https://hub.docker.com/_/ubuntu) | x86\_64 laptop | - ROS2 Humble Hawksbill packages
- non-root user | +| `humble_gpu` | [`nvidia/cuda:12.2.2-devel-ubuntu22.04`](https://hub.docker.com/r/nvidia/cuda) | x86\_64 laptop | - ROS2 Humble Hawksbill packages
- CUDA
- CuDNN
- non-root user | +| `humble_harmonic` | `humble_gpu` | x86\_64 laptop | - Gazebo Harmonic (recommended over fortress) | +| `wheelchair2_base` | `humble` | x86\_64 laptop | - Realsense SDK
- Livox SDK | +| `wheelchair_2_base_gazebo` | `humble_harmonic` | x86\_64 laptop | - ros2\_control
- RGLGazeboPlugin
- Nvidia Optix for gz-sim
- Realsense SDK
- Livox SDK | +| `humble_jetson` | [`nvcr.io/nvidia/l4t-jetpack`](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack) | Jetson (ARM64) | - ROS2 Humble Hawksbill packages
- non-root user | +| `wheelchair2_base_jetson` | `humble_jetson` | Jetson (ARM64) | - Realsense SDK
- Livox SDK | + +> [!CAUTION] +> The ROS1 images are currently **under development** and have not been heavily tested. They may be unstable or contain significant bugs. + +## Authenticating to GitHub Container Registry +To pull or push images to the GitHub Container Registry, you need to authenticate using a personal access token (PAT) with the `write:packages` and `repo` scopes. + +Brief steps are given below, but you can find more detailed instructions in the [GitHub documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic). +1. Create a personal access token (PAT) with the required scopes. +2. Log in to the GitHub Container Registry using the following command: + + ```bash + echo | docker login ghcr.io -u --password-stdin + ``` + +3. Verify that you are logged in by running: + + ```bash + docker info + ``` + +### Debugging +If docker throws the error even after restarting the Docker daemon: + +```txt +Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? +``` + +You can try the following steps: + +1. Docker networking requires IP forwarding. Check if it's enabled: + ```bash + sysctl net.ipv4.ip_forward + ``` + +1. If it returns `0`, enable it with: + + ```bash + sudo sysctl -w net.ipv4.ip_forward=1 + ``` + +1. Then restart the Docker daemon: + + ```bash + sudo systemctl restart docker + ``` + +## Pulling an image To download a pre-built image from GitHub Container Registry (ghcr.io), use the following command: ```bash -docker pull ghcr.io/smart-wheelchair-rrc/:latest +docker pull ghcr.io/smart-wheelchair-rrc/: ``` Replace `` with the desired image name (e.g., `humble`, `wheelchair2_base`). For example: ```bash -docker pull ghcr.io/smart-wheelchair-rrc/humble:latest +docker pull ghcr.io/smart-wheelchair-rrc/humble:v3.0 ``` -### 2. Building an Image (Optional) +> [!NOTE] +> PLease be mindful of the tag you are pulling. The `latest` tag is not used in this repository, so you need to provide a specific version tag (e.g., `v3.0`). -If you prefer to build the image locally from the Dockerfile, clone this repository and navigate to the root directory. Then, use the following command: +## Building an image +Since this repository uses CI/CD builds, certain considerations must be taken into account when building images: -```bash -docker build -t ghcr.io/smart-wheelchair-rrc/ -f /Dockerfile -``` +1. **Dependant images** -Again, replace `` with the appropriate image name. For example, to build the `humble` image: + Certain images depend on other images. For example, `wheelchair2_base_gazebo` depends on `humble_harmonic`. If you want to build `wheelchair2_base_gazebo`, you need to build `humble_harmonic` first. -```bash -docker build -t ghcr.io/smart-wheelchair-rrc/humble -f humble-garden/Dockerfile humble -``` + In the dependant image's Dockerfile, you can specify the base image as follows: -**Explanation of the `docker build` command:** + ```dockerfile + FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:v3.0 + ``` -* `docker build`: The command to build a Docker image. -* `-t ghcr.io/smart-wheelchair-rrc/`: Tags the image with the specified name and registry path. -* `-f /Dockerfile`: Specifies the path to the Dockerfile to use for building the image. -* ``: The build context, which is the directory containing the Dockerfile and any other files needed for the build. + Again, please be mindful of the tag you are using. If you update a base image, and you want the changes to reflect in the dependant image, you need to rebuild the dependant image **with the correct tag of the base image**. -### 3. Pushing an Image (For Contributors) +1. **Online builds must be tagged** -If you have made changes to the Dockerfile and want to contribute by pushing the updated image to the registry, use the following command: + The CI/CD system **will not initiate builds** if the image is not tagged. Moreover, your tag must follow the [SemVer](https://semver.org/spec/v2.0.0.html) format. For example: `v3`, `v3.0`, `v3.1.0`. So your tag names must start with `v` and be followed by a version number. -```bash -docker push ghcr.io/smart-wheelchair-rrc/:latest -``` + Once a commit has been tagged and pushed to the repository, the CI/CD system will automatically build the image and push it to the GitHub Container Registry. It will attempt to do this regardless of the branch you are on. -**Note:** You need to be authenticated with `ghcr.io` and have the appropriate permissions to push images to the `smart-wheelchair-rrc` repository. + > [!IMPORTANT] + > Avoid using the `latest` tag. -### Debugging +1. **Building locally** ->The docker throws " Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? " error, even after restarting docker, do the following: + If you want to build locally, you're free to use any tags you like, however you should be mindful of dependant images and their tags. You can build an image using the following command: -- Docker networking requires IP forwarding. Check if it's enabled: - ```bash - sysctl net.ipv4.ip_forward - ``` -- If it returns 0, enable it with: ```bash - sudo sysctl -w net.ipv4.ip_forward=1 + docker build -t ghcr.io/smart-wheelchair-rrc/: -f ``` -- Then restart Docker: + + Replace `` with the desired image name, `` with the version tag, and `` with the directory containing the Dockerfile. For example, to build the `humble` image: + ```bash - sudo systemctl restart docker + docker build -t ghcr.io/smart-wheelchair-rrc/humble:v3.0 -f ROS2/AMD64x86/humble/Dockerfile ROS2/AMD64x86/humble ``` -## Acknowledgements +### Explanation of the `docker build` command -This work is inspired by the work of [soham2560](https://github.com/soham2560/DockerForROS2Development). +The `docker build` command is used to create a Docker image from a Dockerfile. Here's a breakdown of the command and its arguments: +```bash +docker build -t ghcr.io/smart-wheelchair-rrc/: -f +``` + +| Argument | Value | Example | Description | +| --- | --- | --- | --- | +| `-t` | `ghcr.io/smart-wheelchair-rrc/:` | `ghcr.io/smart-wheelchair-rrc/humble:v3.0` | Tags the image with the specified name and version tag. | +| `-f` | `` | `ROS2/AMD64x86/humble/Dockerfile` | Specifies the path to the Dockerfile to use for building the image. | +| | `` | `ROS2/AMD64x86/humble` | The build context, which is the directory containing the Dockerfile and any other files needed for the build. | + + +## Acknowledgements +This work is inspired by the work of [soham2560](https://github.com/soham2560/DockerForROS2Development). From 840d16aba34f2e813cbb738e638646315ef24b23 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 8 Jun 2025 13:03:08 +0530 Subject: [PATCH 24/36] documentation changes --- .github/workflows/README.md | 156 ++++++++++++++++++++++++++++++++++- .github/workflows/build.yaml | 14 +--- README.md | 25 ++++-- 3 files changed, 176 insertions(+), 19 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index afa5120..cbac998 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -1 +1,155 @@ -# Understanding the CI/CD workflows \ No newline at end of file +# Understanding the CI/CD workflows + +> [!NOTE] +> At the moment, this workflow does not build for the ARM architecture. Please build these locally until Microsoft releases the feature for private repositories. [source one](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories), [source two](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for--private-repositories). For now, Jetson builds done online will simply be skipped. + +## Desired behaviour +1. The user creates a new branch for their changes. +1. The user commits their changes to the branch, with a relevant tag. +1. The user pushes the branch to the remote repository. +1. The CI/CD system detects the new tag and starts building the image. +1. If the build is successful, the image is pushed to the GitHub Container Registry. +1. The user can then pull the image from the registry and use it. + +### Key features +- Dependant images are built in the correct order. +- Images are built with the correct tags. +- The CI/CD system is triggered by tags, not pushes to branches or pull requests. +- Upon any failure, the system will exit gracefully and not proceed with downstream dependant builds. + +## Overview of the main workflow +This is a high-level understanding of the workflow described in [build.yaml](/.github/workflows/build.yaml). + +1. The workflow is triggered when a tag starting with `v` is pushed to the repository. + +1. Firstly, the workflow checks out the code from the repository and looks for changes. At a time, a change may be present in a full directory only. We do not test for individual Dockerfiles because certain images depend on others, and we want to build them in the correct order. + + Places tested for changes: + - `ROS2/AMD64x86/`: desktop images for AMD64x86 architecture + - `ROS2/Jetson`: edge-computing images for NVIDIA Jetson architecture (once implemented) + - `.github/workflows/`: GitHub Actions workflows + +1. Next, the workflow looks for the Git tag. If it finds a tag that starts with `v`, records this to a variable, so that it may be used later in the workflow. + +1. If changes were detected, the workflow proceeds to build the images. If any GitHub Action changes were detected, everything is rebuilt; otherwise only the changed images are rebuilt. + +1. The remainder of the build is split into five sections, which run in three steps (some run in parallel): + + | Step | Sections | + | --- | --- | + | 1 | - ROS2 base humble images (AMD64/x86)
- ROS2 base humble images (Jetson/ARM) | + | 2 | - ROS2 humble_harmonic (AMD64/x86) | + | 3 | - ROS2 wheelchair2_base images (AMD64/x86)
- ROS2 wheelchair2_base_jetson (depends on humble_jetson) | + + By default, all of these sections are configured as [matrix strategies](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow). Although some sections have only one entry, this allows for easy expansion in the future. + +## Overview of the reusable workflow +It quickly became evident that several steps in the workflow were repetitive, so the majority of the actual work was refactored into a [reusable workflow](https://docs.github.com/en/actions/sharing-automations/reusing-workflows). This is described in [build-workflow.yaml](/.github/workflows/build-workflow.yaml), and is briefly explained below. + +This workflow is triggered by the main workflow, and receives the following inputs: + +| Input | Description | Default | +| --- | --- | --- | +| `build_context` | The build context for the Dockerfile | - | +| `image_name` | The target name of the image to build | - | +| `image_version` | The version tag of the image to build | - | +| `runs_on` | The GitHub runner to use for the build | `ubuntu-latest` | + +First, code is checked out, [buildx is setup](https://github.com/docker/setup-buildx-action/tree/v3/), and [GHCR is authenticated](https://github.com/docker/setup-buildx-action/tree/v3/). + +Finally, the actual image is built and (if successful) pushed to the GitHub Container Registry, using the [`docker/build-push-action`](https://github.com/docker/build-push-action/tree/v6/) action. + + +## Deeper dive into the main workflow +Here, we discuss only the potentially confusing parts of the main workflow, which is described in [build.yaml](/.github/workflows/build.yaml). + +You are encouraged to read the [GitHub Actions documentation](https://docs.github.com/en/actions) for more information on how GitHub Actions work, how to write workflows, and reference for syntax. If you use VS Code to write workflows, the [GitHub Actions extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions) is useful. + +### Checking for changes +We use the [`dorny/paths-filter`](https://github.com/dorny/paths-filter/tree/v2/) action to check for changes in the repository. This action allows us to specify paths to check for changes, and it will return a boolean value indicating whether any changes were detected. + +These are stored as outputs of the `changes` job: + +```yaml +outputs: + ros2-amd64: ${{ steps.filter.outputs.ros2-amd64 }} + ros2-jetson: ${{ steps.filter.outputs.ros2-jetson }} + workflow: ${{ steps.filter.outputs.workflow }} + image_version: ${{ steps.set_version.outputs.image_version }} +``` + +As described earlier, we check for changes in the three main directories: + +```yaml +- name: Check for changes + id: filter + uses: dorny/paths-filter@v2 + with: + filters: | + ros2-amd64: + - 'ROS2/AMD64x86/**' + ros2-jetson: + - 'ROS2/Jetson/**' + workflow: + - '.github/workflows/**' +``` + +### Setting the image version +This simply involves obtaining the Git tag and setting it as an environment variable for later use: + +```yaml +- name: Set image version + id: set_version + run: | + if [[ "${{ github.ref }}" == refs/tags/v* ]]; then + echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi +``` + +### Building the images +While there are several sections as described earlier, we shall dive deeper into one of these as exposition. Consider the "Stage 3: ROS2 wheelchair2_base images (AMD64/x86)" section. + +```yaml +# Stage 3: ROS2 wheelchair2_base images (AMD64/x86) +ros2-wheelchair-base: + needs: [changes, ros2-humble-base-amd64, ros2-humble-harmonic] + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Wheelchair2 Base Images + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest +``` + +Let's break this down: +- **needs**: This job depends on the `changes` job and the `ros2-humble-base-amd64` and `ros2-humble-harmonic` jobs. It will only run if these jobs are successful. This ensures that dependant images are built in the correct order. +- **if**: This condition checks if there are changes in the `ROS2/AMD64x86/` directory or if there are changes in the workflows. If either condition is true, this job will run. +- **permissions**: This job requires write access to packages (to push the built images) and read access to contents (to read the repository). +- **strategy**: This defines a matrix strategy for the job. In this case, we have two configurations: + - `wheelchair2_base`: The base image for the wheelchair2 project. + - `wheelchair2_base_gazebo`: The base image for the wheelchair2 project with Gazebo support. +- **uses**: This specifies that the job will use the reusable workflow defined in [build-workflow.yaml](/.github/workflows/build-workflow.yaml). +- **with**: This passes the necessary parameters to the reusable workflow, including the build context, image name, image version, and the runner to use. + +Note the matrix system: +```yaml +strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: "${{ needs.changes.outputs.image_version }}" } +``` + +In this system, we specify one or more configurations for the job. Each configuration corresponds to one resulting image. The reusable workflow will be run for each configuration, allowing us to build multiple images in parallel by just adding one more entry to the `config` list. + +Please consult the [GitHub Actions documentation](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow) for more information on matrix strategies and syntax. \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 38d9cb7..9c8d418 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: push: tags: - 'v*' - - 'rc*' + - 'dev*' - 'latest' jobs: @@ -15,7 +15,6 @@ jobs: ros2-amd64: ${{ steps.filter.outputs.ros2-amd64 }} ros2-jetson: ${{ steps.filter.outputs.ros2-jetson }} workflow: ${{ steps.filter.outputs.workflow }} - any_changed: ${{ steps.filter.outputs.any_changed }} image_version: ${{ steps.set_version.outputs.image_version }} permissions: packages: write @@ -37,18 +36,13 @@ jobs: - 'ROS2/AMD64x86/**' workflow: - '.github/workflows/**' - any_changed: - - 'ROS2/**' - - '.github/workflows/**' -# ros2-jetson: -# - 'ROS2/Jetson/**' + ros2-jetson: + - 'ROS2/Jetson/**' - name: Set image version id: set_version run: | - if [[ "${{ github.ref }}" == refs/tags/v* ]]; then - echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT - fi + echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT # Stage 1: ROS2 base humble images (AMD64/x86) ros2-humble-base-amd64: diff --git a/README.md b/README.md index c96404c..a50fac8 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ This documentation is split into four parts: - [How to use an image](#pulling-an-image) - [How to build an image](#building-an-image) -> [!NOTE] -> This repository uses GitHub Actions for CI/CD. Further documentation on this is available in the [CI/CD documentation](/.github/workflows/README.md). +This repository uses GitHub Actions for CI/CD. Further documentation on how we have implemented this is available in the [CI/CD documentation](/.github/workflows/README.md). ## List of ROS2 Features and Images @@ -84,8 +83,8 @@ Replace `` with the desired image name (e.g., `humble`, `wheelchair2 docker pull ghcr.io/smart-wheelchair-rrc/humble:v3.0 ``` -> [!NOTE] -> PLease be mindful of the tag you are pulling. The `latest` tag is not used in this repository, so you need to provide a specific version tag (e.g., `v3.0`). +> [!IMPORTANT] +> Please be mindful of the tag you are pulling. The `latest` tag is not used in this repository, so you need to provide a specific version tag (e.g., `v3.0`). ## Building an image Since this repository uses CI/CD builds, certain considerations must be taken into account when building images: @@ -108,9 +107,6 @@ Since this repository uses CI/CD builds, certain considerations must be taken in Once a commit has been tagged and pushed to the repository, the CI/CD system will automatically build the image and push it to the GitHub Container Registry. It will attempt to do this regardless of the branch you are on. - > [!IMPORTANT] - > Avoid using the `latest` tag. - 1. **Building locally** If you want to build locally, you're free to use any tags you like, however you should be mindful of dependant images and their tags. You can build an image using the following command: @@ -125,9 +121,12 @@ Since this repository uses CI/CD builds, certain considerations must be taken in docker build -t ghcr.io/smart-wheelchair-rrc/humble:v3.0 -f ROS2/AMD64x86/humble/Dockerfile ROS2/AMD64x86/humble ``` +> [!IMPORTANT] +> Avoid using the `latest` tag. + ### Explanation of the `docker build` command -The `docker build` command is used to create a Docker image from a Dockerfile. Here's a breakdown of the command and its arguments: +The [`docker build` command](https://docs.docker.com/reference/cli/docker/buildx/build/) is used to create a Docker image from a Dockerfile. Here's a breakdown of the command and its arguments: ```bash docker build -t ghcr.io/smart-wheelchair-rrc/: -f @@ -139,6 +138,16 @@ docker build -t ghcr.io/smart-wheelchair-rrc/: -f ` | `ROS2/AMD64x86/humble/Dockerfile` | Specifies the path to the Dockerfile to use for building the image. | | | `` | `ROS2/AMD64x86/humble` | The build context, which is the directory containing the Dockerfile and any other files needed for the build. | +### Recommendations for tagging images +Suggestions for filling in the SemVer version tag. + +Let us assume that the latest image before you start working is `v3.14`. Therefore, the next image you target to release will be `v3.15`. + +However, the CI/CD workflow requires that you tag every commit where you want to build an image AND GitHub requires commit tags to be unique. If you wish to use the online builds to test your changes, you can use the `dev*` tags. For example, you can tag your commit as `dev3.15.0` or `dev3.15.1`. This way, you can test your changes without affecting the main versioning scheme. + +When you are ready to release the next version, (most likely a merge commit), you can tag it as `v3.15.0` or `v3.15`. This will trigger the CI/CD workflow to build the image with the correct version tag. + + ## Acknowledgements This work is inspired by the work of [soham2560](https://github.com/soham2560/DockerForROS2Development). From 06301ce4edcfbc0717864919253ea23a5765fe65 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 8 Jun 2025 13:05:54 +0530 Subject: [PATCH 25/36] formatting --- .github/workflows/README.md | 12 ++++++------ README.md | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index cbac998..5a57f17 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -132,14 +132,14 @@ ros2-wheelchair-base: ``` Let's break this down: -- **needs**: This job depends on the `changes` job and the `ros2-humble-base-amd64` and `ros2-humble-harmonic` jobs. It will only run if these jobs are successful. This ensures that dependant images are built in the correct order. -- **if**: This condition checks if there are changes in the `ROS2/AMD64x86/` directory or if there are changes in the workflows. If either condition is true, this job will run. -- **permissions**: This job requires write access to packages (to push the built images) and read access to contents (to read the repository). -- **strategy**: This defines a matrix strategy for the job. In this case, we have two configurations: +- `needs`: This job depends on the `changes` job and the `ros2-humble-base-amd64` and `ros2-humble-harmonic` jobs. It will only run if these jobs are successful. This ensures that dependant images are built in the correct order. +- `if`: This condition checks if there are changes in the `ROS2/AMD64x86/` directory or if there are changes in the workflows. If either condition is true, this job will run. +- `permissions`: This job requires write access to packages (to push the built images) and read access to contents (to read the repository). +- `strategy`: This defines a matrix strategy for the job. In this case, we have two configurations: - `wheelchair2_base`: The base image for the wheelchair2 project. - `wheelchair2_base_gazebo`: The base image for the wheelchair2 project with Gazebo support. -- **uses**: This specifies that the job will use the reusable workflow defined in [build-workflow.yaml](/.github/workflows/build-workflow.yaml). -- **with**: This passes the necessary parameters to the reusable workflow, including the build context, image name, image version, and the runner to use. +- `uses`: This specifies that the job will use the reusable workflow defined in [build-workflow.yaml](/.github/workflows/build-workflow.yaml). +- `with`: This passes the necessary parameters to the reusable workflow, including the build context, image name, image version, and the runner to use. Note the matrix system: ```yaml diff --git a/README.md b/README.md index a50fac8..27d31b4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ This documentation is split into four parts: - [How to use an image](#pulling-an-image) - [How to build an image](#building-an-image) -This repository uses GitHub Actions for CI/CD. Further documentation on how we have implemented this is available in the [CI/CD documentation](/.github/workflows/README.md). +> [!NOTE] +> This repository uses GitHub Actions for CI/CD. Further documentation on how we have implemented this is available in the [CI/CD documentation](/.github/workflows/README.md). ## List of ROS2 Features and Images From 4de9abd06f2eb173fab765b99c0afb60aba2e358 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 8 Jun 2025 13:11:44 +0530 Subject: [PATCH 26/36] get rid of `--allow-releaseinfo-change` --- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index a4a8ac2..373dfff 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -67,7 +67,7 @@ COPY ./ros_entrypoint.sh / ENTRYPOINT ["/ros_entrypoint.sh"] # install bootstrap tools -RUN sudo apt-get update --allow-releaseinfo-change&& sudo apt-get install --no-install-recommends -y \ +RUN sudo apt-get update && sudo apt-get install --no-install-recommends -y \ build-essential \ git \ bash-completion \ From 1b70b574261403dd349de583edfcaa14f3997213 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Sun, 8 Jun 2025 14:26:22 +0530 Subject: [PATCH 27/36] pushing an image command --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 27d31b4..8480fa4 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,20 @@ Since this repository uses CI/CD builds, certain considerations must be taken in docker build -t ghcr.io/smart-wheelchair-rrc/humble:v3.0 -f ROS2/AMD64x86/humble/Dockerfile ROS2/AMD64x86/humble ``` +1. **Pushing the image** + + After building the image, you can push it to the GitHub Container Registry using the following command: + + ```bash + docker push ghcr.io/smart-wheelchair-rrc/: + ``` + + For example, to push the `humble` image: + + ```bash + docker push ghcr.io/smart-wheelchair-rrc/humble:v3.0 + ``` + > [!IMPORTANT] > Avoid using the `latest` tag. From ef15bd715fad31791392adf9e25ea7002cf4ff88 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 9 Jun 2025 11:49:00 +0530 Subject: [PATCH 28/36] set username to `container_user` --- ROS2/AMD64x86/humble/Dockerfile | 2 +- ROS2/AMD64x86/humble_gpu/Dockerfile | 2 +- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 8 ++++---- .../wheelchair2_base_gazebo/Dockerfile | 20 +++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ROS2/AMD64x86/humble/Dockerfile b/ROS2/AMD64x86/humble/Dockerfile index ddb5820..69f9880 100644 --- a/ROS2/AMD64x86/humble/Dockerfile +++ b/ROS2/AMD64x86/humble/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:jammy # basic args ARG ROS_DISTRO=humble -ARG USERNAME=wheelchair2 +ARG USERNAME=container_user ARG USER_UID=1000 ARG USER_GID=$USER_UID diff --git a/ROS2/AMD64x86/humble_gpu/Dockerfile b/ROS2/AMD64x86/humble_gpu/Dockerfile index 373dfff..9791eb2 100644 --- a/ROS2/AMD64x86/humble_gpu/Dockerfile +++ b/ROS2/AMD64x86/humble_gpu/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cuda:12.2.2-base-ubuntu22.04 # basic args ARG ROS_DISTRO=humble -ARG USERNAME=wheelchair2 +ARG USERNAME=container_user ARG USER_UID=1000 ARG USER_GID=$USER_UID diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index a4955f3..510a850 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -32,9 +32,9 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* # Build and install Realsense-SDK -WORKDIR /home/wheelchair2 +WORKDIR /home/$USERNAME RUN git clone --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git -WORKDIR /home/wheelchair2/librealsense +WORKDIR /home/$USERNAME/librealsense RUN sudo mkdir -p /etc/udev/rules.d && \ ./scripts/setup_udev_rules.sh \ ./scripts/patch-realsense-ubuntu-lts-hwe.sh @@ -43,7 +43,7 @@ RUN mkdir build && cd build \ && sudo make uninstall && make clean && make && sudo make install # Build and install Livox-SDK2 -WORKDIR /home/wheelchair2 +WORKDIR /home/$USERNAME RUN git clone https://github.com/rtarun1/Livox-SDK2.git RUN cd Livox-SDK2 \ && mkdir build \ @@ -76,4 +76,4 @@ RUN echo 'export TERM="xterm-256color"' | sudo tee -a ~/.bashrc > /dev/null && \ echo "export PS1='\\[\\033[01;32m\\]\\u@\\h:\\[\\033[01;34m\\]\\w\\$\\[\\033[00m\\] '" | sudo tee -a ~/.bashrc > /dev/null # Environment variable for map folder -ENV MAP_DIR=/home/wheelchair2/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file +ENV MAP_DIR=/home/$USERNAME/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 8152f45..8d5cb9f 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -32,9 +32,9 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* # Build and install Realsense-SDK -WORKDIR /home/wheelchair2 +WORKDIR /home/$USERNAME RUN git clone --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git -WORKDIR /home/wheelchair2/librealsense +WORKDIR /home/$USERNAME/librealsense RUN sudo mkdir -p /etc/udev/rules.d && \ ./scripts/setup_udev_rules.sh \ ./scripts/patch-realsense-ubuntu-lts-hwe.sh @@ -43,7 +43,7 @@ RUN mkdir build && cd build \ && sudo make uninstall && make clean && make && sudo make install # Build and install Livox-SDK2 -WORKDIR /home/wheelchair2 +WORKDIR /home/$USERNAME RUN git clone https://github.com/rtarun1/Livox-SDK2.git RUN cd Livox-SDK2 \ && mkdir build \ @@ -60,12 +60,12 @@ RUN sudo apt-get update \ && sudo apt-get -y install --no-install-recommends $(cat /tmp/rosPkgs.list) \ && sudo rm -rf /var/lib/apt/lists/* -WORKDIR /home/wheelchair2/gz_ros2_control_ws/src +WORKDIR /home/$USERNAME/gz_ros2_control_ws/src RUN git clone https://github.com/ros-controls/gz_ros2_control -b $ROS_DISTRO . \ && export GZ_VERSION=harmonic \ && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y --skip-keys="ros_gz_bridge ros_gz_sim" -WORKDIR /home/wheelchair2/gz_ros2_control_ws +WORKDIR /home/$USERNAME/gz_ros2_control_ws RUN source /opt/ros/$ROS_DISTRO/setup.bash \ && colcon build \ && echo "source ~/gz_ros2_control_ws/install/setup.bash" | sudo tee -a ~/.bashrc > /dev/null @@ -74,16 +74,16 @@ RUN sudo mkdir -p /opt/nvidia/ COPY NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ /opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ ENV OptiX_INSTALL_DIR=/opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ -WORKDIR /home/wheelchair2 +WORKDIR /home/$USERNAME RUN git clone https://github.com/RobotecAI/RGLGazeboPlugin.git \ && cd RGLGazeboPlugin \ && mkdir build && cd build \ && cmake .. && sudo make -j && sudo make install # Environment variable for RGLGazeboPlugin -ENV GZ_GUI_PLUGIN_PATH=/home/wheelchair2/RGLGazeboPlugin/install/RGLVisualize -ENV GZ_SIM_SYSTEM_PLUGIN_PATH=/home/wheelchair2/RGLGazeboPlugin/install/RGLServerPlugin -ENV RGL_PATTERNS_DIR=/home/wheelchair2/RGLGazeboPlugin/lidar_patterns +ENV GZ_GUI_PLUGIN_PATH=/home/$USERNAME/RGLGazeboPlugin/install/RGLVisualize +ENV GZ_SIM_SYSTEM_PLUGIN_PATH=/home/$USERNAME/RGLGazeboPlugin/install/RGLServerPlugin +ENV RGL_PATTERNS_DIR=/home/$USERNAME/RGLGazeboPlugin/lidar_patterns COPY pythonPkgs.list /tmp/pythonPkgs.list RUN sudo apt-get update \ @@ -105,4 +105,4 @@ RUN echo 'export TERM="xterm-256color"' | sudo tee -a ~/.bashrc > /dev/null && \ echo "export PS1='\\[\\033[01;32m\\]\\u@\\h:\\[\\033[01;34m\\]\\w\\$\\[\\033[00m\\] '" | sudo tee -a ~/.bashrc > /dev/null # Environment variable for map folder -ENV MAP_DIR=/home/wheelchair2/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file +ENV MAP_DIR=/home/$USERNAME/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file From 3fe87e21cfaa151fdfa443e79cdee2e884cb9b00 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 9 Jun 2025 11:50:01 +0530 Subject: [PATCH 29/36] turn off online Jetson builds --- .github/workflows/build.yaml | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9c8d418..1860f04 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,8 +36,8 @@ jobs: - 'ROS2/AMD64x86/**' workflow: - '.github/workflows/**' - ros2-jetson: - - 'ROS2/Jetson/**' +# ros2-jetson: +# - 'ROS2/Jetson/**' - name: Set image version id: set_version @@ -65,23 +65,23 @@ jobs: runs_on: ubuntu-latest # Stage 1: ROS2 base humble images (Jetson/ARM) - ros2-humble-jetson: - needs: changes - if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - name: ROS2 Humble Jetson Base - permissions: - packages: write - contents: read - strategy: - matrix: - config: - - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - uses: ./.github/workflows/build-workflow.yaml - with: - build_context: ${{ matrix.config.build_context }} - image_name: ${{ matrix.config.image_name }} - image_version: ${{ matrix.config.image_version }} - runs_on: ubuntu-24.04-arm + # ros2-humble-jetson: + # needs: changes + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Humble Jetson Base + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm # Stage 2: ROS2 humble_harmonic (depends on base humble) ros2-humble-harmonic: @@ -123,20 +123,20 @@ jobs: runs_on: ubuntu-latest # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) - ros2-wheelchair-jetson: - needs: [changes, ros2-humble-jetson] - if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} - name: ROS2 Wheelchair2 Jetson Images - permissions: - packages: write - contents: read - strategy: - matrix: - config: - - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } - uses: ./.github/workflows/build-workflow.yaml - with: - build_context: ${{ matrix.config.build_context }} - image_name: ${{ matrix.config.image_name }} - image_version: ${{ matrix.config.image_version }} - runs_on: ubuntu-24.04-arm \ No newline at end of file + # ros2-wheelchair-jetson: + # needs: [changes, ros2-humble-jetson] + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Wheelchair2 Jetson Images + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm \ No newline at end of file From 5c9156bb86e84a1982d307a840140ca2f43bc603 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 9 Jun 2025 11:51:26 +0530 Subject: [PATCH 30/36] clarify docs --- .github/workflows/README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 5a57f17..6447e53 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -33,9 +33,9 @@ This is a high-level understanding of the workflow described in [build.yaml](/.g 1. If changes were detected, the workflow proceeds to build the images. If any GitHub Action changes were detected, everything is rebuilt; otherwise only the changed images are rebuilt. -1. The remainder of the build is split into five sections, which run in three steps (some run in parallel): +1. The remainder of the build is split into five sections, which run in three steps (some sections run in parallel): - | Step | Sections | + | Step | Sections that run in parallel | | --- | --- | | 1 | - ROS2 base humble images (AMD64/x86)
- ROS2 base humble images (Jetson/ARM) | | 2 | - ROS2 humble_harmonic (AMD64/x86) | @@ -101,9 +101,7 @@ This simply involves obtaining the Git tag and setting it as an environment vari - name: Set image version id: set_version run: | - if [[ "${{ github.ref }}" == refs/tags/v* ]]; then - echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT - fi + echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT ``` ### Building the images From 003df90df1d73a2eda4c9a6755c3758bdf4e1c48 Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Mon, 9 Jun 2025 12:38:12 +0530 Subject: [PATCH 31/36] hardcode `container_user` ARG in downstream x86_64 images --- ROS2/AMD64x86/humble_harmonic/Dockerfile | 4 +++- ROS2/AMD64x86/wheelchair2_base/Dockerfile | 4 +++- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ROS2/AMD64x86/humble_harmonic/Dockerfile b/ROS2/AMD64x86/humble_harmonic/Dockerfile index 506dee3..72e4776 100644 --- a/ROS2/AMD64x86/humble_harmonic/Dockerfile +++ b/ROS2/AMD64x86/humble_harmonic/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:v3.0 +FROM ghcr.io/smart-wheelchair-rrc/humble_gpu:v3.1 + +ARG USERNAME=container_user # Environment setup ENV GZ_VERSION=harmonic diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index 510a850..ddf95bd 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble:v3.0 +FROM ghcr.io/smart-wheelchair-rrc/humble:v3.1 + +ARG USERNAME=container_user # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index 8d5cb9f..ba54c90 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:v3.0 +FROM ghcr.io/smart-wheelchair-rrc/humble_harmonic:v3.1 + +ARG USERNAME=container_user # Add the following labels LABEL org.opencontainers.image.description="Wheelchair2" From 0ca337e921e81fcabd3c8949c6da27ba5087b752 Mon Sep 17 00:00:00 2001 From: eccentricOrange Date: Tue, 24 Jun 2025 12:35:36 +0530 Subject: [PATCH 32/36] accelerate Git clones --- README.md | 16 ++++++++++++++++ ROS2/AMD64x86/wheelchair2_base/Dockerfile | 4 ++-- ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile | 8 ++++---- ROS2/Jetson/wheelchair2_base_jetson/Dockerfile | 4 ++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8480fa4..a3e5b31 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,22 @@ You can try the following steps: sudo systemctl restart docker ``` +1. When we're building a package from a GitHub repository, we only need the latest commits. We achieve this using the `--depth 1` option in the `git clone` command. This option tells Git to clone only the latest commit, which is sufficient for building the package. + + Moreover, Git usually doesn't print logs to stdout when run in a container, but these are very useful for debugging. We enable these using the `--progress --verbose` flags. + + Therefore, a complete `git clone` command would look like this: + + ```bash + git clone --depth 1 --progress --verbose + ``` + + As an example: + + ```bash + git clone --depth=1 --progress --verbose https://github.com/rtarun1/Livox-SDK2.git + ``` + ## Pulling an image To download a pre-built image from GitHub Container Registry (ghcr.io), use the following command: diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index ddf95bd..19e7d8d 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -35,7 +35,7 @@ RUN sudo apt-get update \ # Build and install Realsense-SDK WORKDIR /home/$USERNAME -RUN git clone --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git +RUN git clone --depth=1 --progress --verbose --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git WORKDIR /home/$USERNAME/librealsense RUN sudo mkdir -p /etc/udev/rules.d && \ ./scripts/setup_udev_rules.sh \ @@ -46,7 +46,7 @@ RUN mkdir build && cd build \ # Build and install Livox-SDK2 WORKDIR /home/$USERNAME -RUN git clone https://github.com/rtarun1/Livox-SDK2.git +RUN git clone --depth=1 --progress --verbose https://github.com/rtarun1/Livox-SDK2.git RUN cd Livox-SDK2 \ && mkdir build \ && cd build \ diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index ba54c90..d12c3f5 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -35,7 +35,7 @@ RUN sudo apt-get update \ # Build and install Realsense-SDK WORKDIR /home/$USERNAME -RUN git clone --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git +RUN git clone --depth=1 --progress --verbose --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git WORKDIR /home/$USERNAME/librealsense RUN sudo mkdir -p /etc/udev/rules.d && \ ./scripts/setup_udev_rules.sh \ @@ -46,7 +46,7 @@ RUN mkdir build && cd build \ # Build and install Livox-SDK2 WORKDIR /home/$USERNAME -RUN git clone https://github.com/rtarun1/Livox-SDK2.git +RUN git clone --depth=1 --progress --verbose https://github.com/rtarun1/Livox-SDK2.git RUN cd Livox-SDK2 \ && mkdir build \ && cd build \ @@ -63,7 +63,7 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* WORKDIR /home/$USERNAME/gz_ros2_control_ws/src -RUN git clone https://github.com/ros-controls/gz_ros2_control -b $ROS_DISTRO . \ +RUN git clone --depth=1 --progress --verbose https://github.com/ros-controls/gz_ros2_control -b $ROS_DISTRO . \ && export GZ_VERSION=harmonic \ && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y --skip-keys="ros_gz_bridge ros_gz_sim" @@ -77,7 +77,7 @@ COPY NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ /opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-l ENV OptiX_INSTALL_DIR=/opt/nvidia/NVIDIA-OptiX-SDK-7.2.0-linux64-x86_64/ WORKDIR /home/$USERNAME -RUN git clone https://github.com/RobotecAI/RGLGazeboPlugin.git \ +RUN git clone --depth=1 --progress --verbose https://github.com/RobotecAI/RGLGazeboPlugin.git \ && cd RGLGazeboPlugin \ && mkdir build && cd build \ && cmake .. && sudo make -j && sudo make install diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index cc12ba3..f21a58f 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -35,7 +35,7 @@ RUN sudo apt-get update \ # Build and install Realsense-SDK WORKDIR /home/$USERNAME -RUN git clone --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git +RUN git clone --depth=1 --progress --verbose --branch v2.56.2 https://github.com/IntelRealSense/librealsense.git WORKDIR /home/$USERNAME/librealsense RUN sudo mkdir -p /etc/udev/rules.d && \ ./scripts/setup_udev_rules.sh \ @@ -46,7 +46,7 @@ RUN mkdir build && cd build \ # Build and install Livox-SDK2 WORKDIR /home/$USERNAME -RUN git clone https://github.com/rtarun1/Livox-SDK2.git +RUN git clone --depth=1 --progress --verbose https://github.com/rtarun1/Livox-SDK2.git RUN cd Livox-SDK2 \ && mkdir build \ && cd build \ From dbb6e6a9a1b1c9d49af400f9e62ee131fab2460c Mon Sep 17 00:00:00 2001 From: eccentricOrange Date: Tue, 24 Jun 2025 12:37:57 +0530 Subject: [PATCH 33/36] typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3e5b31..0f5a327 100644 --- a/README.md +++ b/README.md @@ -70,14 +70,14 @@ You can try the following steps: sudo systemctl restart docker ``` -1. When we're building a package from a GitHub repository, we only need the latest commits. We achieve this using the `--depth 1` option in the `git clone` command. This option tells Git to clone only the latest commit, which is sufficient for building the package. +1. When we're building a package from a GitHub repository, we only need the latest commits. We achieve this using the `--depth=1` option in the `git clone` command. This option tells Git to clone only the latest commit, which is sufficient for building the package. Moreover, Git usually doesn't print logs to stdout when run in a container, but these are very useful for debugging. We enable these using the `--progress --verbose` flags. Therefore, a complete `git clone` command would look like this: ```bash - git clone --depth 1 --progress --verbose + git clone --depth=1 --progress --verbose ``` As an example: From 7eaa1bb386d942e3d2f9a6195d89d596d94ac0b2 Mon Sep 17 00:00:00 2001 From: rtarun1 Date: Wed, 25 Jun 2025 15:27:53 +0530 Subject: [PATCH 34/36] Enabled tmux scroll --- ROS2/AMD64x86/wheelchair2_base/.tmux.conf | 24 +++++++++++++++++++ ROS2/AMD64x86/wheelchair2_base/Dockerfile | 2 ++ .../wheelchair2_base_gazebo/.tmux.conf | 24 +++++++++++++++++++ .../wheelchair2_base_gazebo/Dockerfile | 2 ++ .../Jetson/wheelchair2_base_jetson/.tmux.conf | 24 +++++++++++++++++++ .../Jetson/wheelchair2_base_jetson/Dockerfile | 2 ++ 6 files changed, 78 insertions(+) create mode 100644 ROS2/AMD64x86/wheelchair2_base/.tmux.conf create mode 100644 ROS2/AMD64x86/wheelchair2_base_gazebo/.tmux.conf create mode 100644 ROS2/Jetson/wheelchair2_base_jetson/.tmux.conf diff --git a/ROS2/AMD64x86/wheelchair2_base/.tmux.conf b/ROS2/AMD64x86/wheelchair2_base/.tmux.conf new file mode 100644 index 0000000..ef5c78d --- /dev/null +++ b/ROS2/AMD64x86/wheelchair2_base/.tmux.conf @@ -0,0 +1,24 @@ +# Minimal tmux configuration for scrolling support +# Save this as .tmux.conf + +# Enable mouse support (includes scrolling) +set -g mouse on + +# Increase scrollback buffer size from default 2000 to 10000 +set -g history-limit 10000 + +# Enable mouse wheel scrolling in copy mode and normal mode +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" +bind -n WheelDownPane select-pane -t= \; send-keys -M + +# Vi-style copy mode (optional but recommended) +setw -g mode-keys vi + +# Easy access to copy mode with Page Up +bind -n Pageup copy-mode -u + +# Shift + Page Up for copy mode (alternative) +bind -n S-Pageup copy-mode -u + +# Shift + Page Down to exit copy mode +bind -n S-Pagedown send-keys Pagedown \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base/Dockerfile b/ROS2/AMD64x86/wheelchair2_base/Dockerfile index ddf95bd..7137075 100644 --- a/ROS2/AMD64x86/wheelchair2_base/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base/Dockerfile @@ -77,5 +77,7 @@ RUN sudo apt-get update \ RUN echo 'export TERM="xterm-256color"' | sudo tee -a ~/.bashrc > /dev/null && \ echo "export PS1='\\[\\033[01;32m\\]\\u@\\h:\\[\\033[01;34m\\]\\w\\$\\[\\033[00m\\] '" | sudo tee -a ~/.bashrc > /dev/null +COPY .tmux.conf /home/wheelchair2/.tmux.conf + # Environment variable for map folder ENV MAP_DIR=/home/$USERNAME/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/.tmux.conf b/ROS2/AMD64x86/wheelchair2_base_gazebo/.tmux.conf new file mode 100644 index 0000000..ef5c78d --- /dev/null +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/.tmux.conf @@ -0,0 +1,24 @@ +# Minimal tmux configuration for scrolling support +# Save this as .tmux.conf + +# Enable mouse support (includes scrolling) +set -g mouse on + +# Increase scrollback buffer size from default 2000 to 10000 +set -g history-limit 10000 + +# Enable mouse wheel scrolling in copy mode and normal mode +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" +bind -n WheelDownPane select-pane -t= \; send-keys -M + +# Vi-style copy mode (optional but recommended) +setw -g mode-keys vi + +# Easy access to copy mode with Page Up +bind -n Pageup copy-mode -u + +# Shift + Page Up for copy mode (alternative) +bind -n S-Pageup copy-mode -u + +# Shift + Page Down to exit copy mode +bind -n S-Pagedown send-keys Pagedown \ No newline at end of file diff --git a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile index ba54c90..f64608d 100644 --- a/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile +++ b/ROS2/AMD64x86/wheelchair2_base_gazebo/Dockerfile @@ -106,5 +106,7 @@ RUN sudo apt-get update \ RUN echo 'export TERM="xterm-256color"' | sudo tee -a ~/.bashrc > /dev/null && \ echo "export PS1='\\[\\033[01;32m\\]\\u@\\h:\\[\\033[01;34m\\]\\w\\$\\[\\033[00m\\] '" | sudo tee -a ~/.bashrc > /dev/null +COPY .tmux.conf /home/wheelchair2/.tmux.conf + # Environment variable for map folder ENV MAP_DIR=/home/$USERNAME/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file diff --git a/ROS2/Jetson/wheelchair2_base_jetson/.tmux.conf b/ROS2/Jetson/wheelchair2_base_jetson/.tmux.conf new file mode 100644 index 0000000..ef5c78d --- /dev/null +++ b/ROS2/Jetson/wheelchair2_base_jetson/.tmux.conf @@ -0,0 +1,24 @@ +# Minimal tmux configuration for scrolling support +# Save this as .tmux.conf + +# Enable mouse support (includes scrolling) +set -g mouse on + +# Increase scrollback buffer size from default 2000 to 10000 +set -g history-limit 10000 + +# Enable mouse wheel scrolling in copy mode and normal mode +bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" +bind -n WheelDownPane select-pane -t= \; send-keys -M + +# Vi-style copy mode (optional but recommended) +setw -g mode-keys vi + +# Easy access to copy mode with Page Up +bind -n Pageup copy-mode -u + +# Shift + Page Up for copy mode (alternative) +bind -n S-Pageup copy-mode -u + +# Shift + Page Down to exit copy mode +bind -n S-Pagedown send-keys Pagedown \ No newline at end of file diff --git a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile index cc12ba3..7314d18 100644 --- a/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile +++ b/ROS2/Jetson/wheelchair2_base_jetson/Dockerfile @@ -77,5 +77,7 @@ RUN sudo apt-get update \ RUN echo 'export TERM="xterm-256color"' | sudo tee -a ~/.bashrc > /dev/null && \ echo "export PS1='\\[\\033[01;32m\\]\\u@\\h:\\[\\033[01;34m\\]\\w\\$\\[\\033[00m\\] '" | sudo tee -a ~/.bashrc > /dev/null +COPY .tmux.conf /home/wheelchair2/.tmux.conf + # Environment variable for map folder ENV MAP_DIR=/home/$USERNAME/wheelchair2/src/wheelchair2_navigation/maps \ No newline at end of file From 91c9c19d8a9ac79f47383441e71fa7cc47f447b5 Mon Sep 17 00:00:00 2001 From: rtarun1 Date: Wed, 25 Jun 2025 15:55:12 +0530 Subject: [PATCH 35/36] added seprate build actions for release and dev --- .../{build.yaml => build-release.yaml} | 4 +- .github/workflows/build-test.yaml | 140 ++++++++++++++++++ 2 files changed, 142 insertions(+), 2 deletions(-) rename .github/workflows/{build.yaml => build-release.yaml} (99%) create mode 100644 .github/workflows/build-test.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build-release.yaml similarity index 99% rename from .github/workflows/build.yaml rename to .github/workflows/build-release.yaml index 1860f04..aa3de01 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build-release.yaml @@ -4,9 +4,9 @@ on: push: tags: - 'v*' - - 'dev*' - 'latest' - + branches: + - master jobs: # Detect file changes changes: diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml new file mode 100644 index 0000000..e218daa --- /dev/null +++ b/.github/workflows/build-test.yaml @@ -0,0 +1,140 @@ +name: Build Multi-Architecture ROS Containers + +on: + push: + tags: + - 'dev*' + +jobs: + # Detect file changes + changes: + runs-on: ubuntu-latest + outputs: + ros2-amd64: ${{ steps.filter.outputs.ros2-amd64 }} + ros2-jetson: ${{ steps.filter.outputs.ros2-jetson }} + workflow: ${{ steps.filter.outputs.workflow }} + image_version: ${{ steps.set_version.outputs.image_version }} + permissions: + packages: write + contents: read + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # fetch all history to compare with previous commits + + - name: Check for file changes + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + ros2-amd64: + - 'ROS2/AMD64x86/**' + workflow: + - '.github/workflows/**' +# ros2-jetson: +# - 'ROS2/Jetson/**' + + - name: Set image version + id: set_version + run: | + echo "image_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT + + # Stage 1: ROS2 base humble images (AMD64/x86) + ros2-humble-base-amd64: + needs: changes + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Base Images (AMD64) + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/humble', image_name: 'humble', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/humble_gpu', image_name: 'humble_gpu', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest + + # Stage 1: ROS2 base humble images (Jetson/ARM) + # ros2-humble-jetson: + # needs: changes + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Humble Jetson Base + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/humble_jetson', image_name: 'humble_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm + + # Stage 2: ROS2 humble_harmonic (depends on base humble) + ros2-humble-harmonic: + needs: [changes, ros2-humble-base-amd64] + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Humble Harmonic + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/humble_harmonic', image_name: 'humble_harmonic', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest + + # Stage 3: ROS2 wheelchair2_base images (AMD64/x86) + ros2-wheelchair-base: + needs: [changes, ros2-humble-base-amd64, ros2-humble-harmonic] + if: ${{ needs.changes.outputs.ros2-amd64 == 'true' || needs.changes.outputs.workflow == 'true' }} + name: ROS2 Wheelchair2 Base Images + permissions: + packages: write + contents: read + strategy: + matrix: + config: + - { build_context: './ROS2/AMD64x86/wheelchair2_base', image_name: 'wheelchair2_base', image_version: "${{ needs.changes.outputs.image_version }}" } + - { build_context: './ROS2/AMD64x86/wheelchair2_base_gazebo', image_name: 'wheelchair2_base_gazebo', image_version: "${{ needs.changes.outputs.image_version }}" } + uses: ./.github/workflows/build-workflow.yaml + with: + build_context: ${{ matrix.config.build_context }} + image_name: ${{ matrix.config.image_name }} + image_version: ${{ matrix.config.image_version }} + runs_on: ubuntu-latest + + # Stage 3: ROS2 wheelchair2_base_jetson (depends on humble_jetson) + # ros2-wheelchair-jetson: + # needs: [changes, ros2-humble-jetson] + # if: ${{ needs.changes.outputs.ros2-jetson == 'true' || needs.changes.outputs.workflow == 'true' }} + # name: ROS2 Wheelchair2 Jetson Images + # permissions: + # packages: write + # contents: read + # strategy: + # matrix: + # config: + # - { build_context: './ROS2/Jetson/wheelchair2_base_jetson', image_name: 'wheelchair2_base_jetson', image_version: "${{ needs.changes.outputs.image_version }}" } + # uses: ./.github/workflows/build-workflow.yaml + # with: + # build_context: ${{ matrix.config.build_context }} + # image_name: ${{ matrix.config.image_name }} + # image_version: ${{ matrix.config.image_version }} + # runs_on: ubuntu-24.04-arm \ No newline at end of file From cb99bd53e8e48588e2fd63f1f9edea2c2dca4dcd Mon Sep 17 00:00:00 2001 From: Eccentric Orange Date: Wed, 25 Jun 2025 16:20:14 +0530 Subject: [PATCH 36/36] document changes separating release and test CI/CD builds --- .github/workflows/README.md | 4 ++-- README.md | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 6447e53..3386944 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -20,7 +20,7 @@ ## Overview of the main workflow This is a high-level understanding of the workflow described in [build.yaml](/.github/workflows/build.yaml). -1. The workflow is triggered when a tag starting with `v` is pushed to the repository. +1. The workflow is triggered when a tag starting with `v` (or `dev`) is pushed to the repository. 1. Firstly, the workflow checks out the code from the repository and looks for changes. At a time, a change may be present in a full directory only. We do not test for individual Dockerfiles because certain images depend on others, and we want to build them in the correct order. @@ -29,7 +29,7 @@ This is a high-level understanding of the workflow described in [build.yaml](/.g - `ROS2/Jetson`: edge-computing images for NVIDIA Jetson architecture (once implemented) - `.github/workflows/`: GitHub Actions workflows -1. Next, the workflow looks for the Git tag. If it finds a tag that starts with `v`, records this to a variable, so that it may be used later in the workflow. +1. Next, the workflow looks for the Git tag. If it finds a tag that starts with `v`/`dev`, records this to a variable, so that it may be used later in the workflow. 1. If changes were detected, the workflow proceeds to build the images. If any GitHub Action changes were detected, everything is rebuilt; otherwise only the changed images are rebuilt. diff --git a/README.md b/README.md index 0f5a327..d6b1408 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,14 @@ Let us assume that the latest image before you start working is `v3.14`. Therefo However, the CI/CD workflow requires that you tag every commit where you want to build an image AND GitHub requires commit tags to be unique. If you wish to use the online builds to test your changes, you can use the `dev*` tags. For example, you can tag your commit as `dev3.15.0` or `dev3.15.1`. This way, you can test your changes without affecting the main versioning scheme. -When you are ready to release the next version, (most likely a merge commit), you can tag it as `v3.15.0` or `v3.15`. This will trigger the CI/CD workflow to build the image with the correct version tag. +When you are ready to release the next version (most likely a merge commit), you can tag it as `v3.15.0` or `v3.15`. This will trigger the CI/CD workflow to build the image with the correct version tag. + +> [!NOTE] +> - `v*` tags only work on the `master` branch. +> - `dev*` tags can be used on any branch (including `master`). +> - While the `latest` tag is supported on the `master` branch, it is **not recommended** to use it. Instead, prefer specific version tags like `v3.15` or `v3.15.0`. +> +> Both tags will trigger the workflow and push the image to GHCR.