Skip to content

Commit

Permalink
Test base image build
Browse files Browse the repository at this point in the history
  • Loading branch information
leungjch committed Jan 28, 2024
1 parent 8fb2d31 commit 06193cf
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/include/base_image_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
"ros2": "humble"
}
},
{
"tag": "cuda12.2-humble-tensorrt-ubuntu22.04",
"external_image": "nvcr.io/nvidia/tensorrt:23.09-py3",
"injections": {
"ros2": "humble",
"opencv": "4.5.4"
}
}



Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/build_base_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ jobs:
GENERIC_IMAGE=${{ matrix.external_image }}
ROS_DISTRO=${{ matrix.injections.ros2 }}
- name: Inject OpenCV into Image
if: ${{ matrix.injections.opencv != '' }}
uses: docker/build-push-action@v5
with:
context: .
file: docker/base/inject_opencv.Dockerfile
push: true
tags: |
${{ steps.construct-registry-url.outputs.url }}_generic
cache-from: |
${{ steps.construct-registry-url.outputs.url }}_generic
cache-to: type=inline
builder: ${{ steps.buildx.outputs.name }}
target: devel
build-args: |
GENERIC_IMAGE=${{ matrix.external_image }}
OPENCV_VERSION=${{ matrix.injections.opencv }}
- name: Prepare Generic Image as Monorepo Base Image
uses: docker/build-push-action@v5
with:
Expand Down
7 changes: 7 additions & 0 deletions docker/base/inject_opencv.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG GENERIC_IMAGE

########################## Install ROS2 Core ##########################
FROM ${GENERIC_IMAGE} as wato_base

RUN sudo apt install -y libopencv-dev python3-opencv
RUN export OpenCV_DIR=/usr/lib/x86_64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake

0 comments on commit 06193cf

Please sign in to comment.