-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REL.10.01.00.01. Compatible with: Processor SDK Linux for Edge AI 10.…
…01.00
- Loading branch information
Showing
202 changed files
with
515 additions
and
14,312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: docker-build-all-targets | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_stage1: | ||
uses: ./.github/workflows/docker-build-stage1.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: j784s4 | ||
|
||
build_am69a: | ||
needs: build_stage1 | ||
uses: ./.github/workflows/docker-build-stage2.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: j784s4 | ||
|
||
build_am68a: | ||
needs: build_stage1 | ||
uses: ./.github/workflows/docker-build-stage2.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: j721s2 | ||
|
||
build_tda4vm: | ||
needs: build_stage1 | ||
uses: ./.github/workflows/docker-build-stage2.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: j721e | ||
|
||
build_am67a: | ||
needs: build_stage1 | ||
uses: ./.github/workflows/docker-build-stage2.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: j722s | ||
|
||
build_am62a: | ||
needs: build_stage1 | ||
uses: ./.github/workflows/docker-build-stage2.yml | ||
secrets: | ||
env_PAT: ${{ secrets.GHCR_PAT }} | ||
with: | ||
soc: am62a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: docker-build-pc | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
# SDK_VER should match to the SDK_VER defined in docker/Makefile | ||
SDK_VER: 10.1.0.1 | ||
SDK_DIR: ${{ github.workspace }} | ||
GH_TOKEN: ${{ secrets.GHCR_PAT }} | ||
|
||
jobs: | ||
build_pc: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GHCR_PAT }} | ||
|
||
- name: Initial setup for the SDK repository | ||
run: | | ||
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_gscam.sh | ||
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh 2 | ||
# verify | ||
ls -l $SDK_DIR/ros2/drivers | ||
- name: Set up Docker build script | ||
run: | | ||
mkdir -p $HOME/j7ros_home | ||
cd $HOME/j7ros_home | ||
makefile_path=$SDK_DIR/docker/Makefile | ||
if [ -f $makefile_path ]; then | ||
ln -snf $SDK_DIR/docker/Makefile . | ||
else | ||
echo "Error: $makefile_path does not exist" | ||
exit 1 | ||
fi | ||
PLATFORM=pc SDK_DIR=$SDK_DIR make scripts | ||
- name: Verify script generation | ||
run: | | ||
ls -l $HOME/j7ros_home | ||
more $HOME/j7ros_home/docker_build.sh | ||
- name: Build Docker image | ||
run: | | ||
cd $HOME/j7ros_home | ||
./docker_build.sh | ||
- name: Build and install the SDK ROS nodes | ||
run: | | ||
cd $HOME/j7ros_home | ||
# create docker_run_commit.sh | ||
script_file=docker_run_commit.sh | ||
cp docker_run.sh $script_file | ||
sed -i 's/docker run -it --rm \\/docker run --platform linux\/amd64 \\/' $script_file | ||
sed -i '/xhost +local:$USER/d' $script_file | ||
sed -i '/xhost -local:$USER/d' $script_file | ||
echo 'CONTAINER_ID=$(docker ps -a --filter "ancestor=$DOCKER_TAG" --format "{{.ID}}" | head -n 1)' >> $script_file | ||
echo 'docker tag $DOCKER_TAG ${DOCKER_TAG}-org' >> $script_file | ||
echo 'docker commit $CONTAINER_ID ${DOCKER_TAG}' >> $script_file | ||
more $script_file | ||
# build and install the SDK ROS nodes | ||
./docker_run_commit.sh colcon build \ | ||
--base-paths /root/j7ros_home/ros_ws/src/robotics_sdk/ros2 \ | ||
--cmake-force-configure \ | ||
--packages-skip ti_external ti_vision_cnn ti_sde ti_estop ti_vl ti_objdet_range ti_ros_gst_plugins \ | ||
--install-base /opt/ros/robotics_sdk_install | ||
docker images | ||
- name: Add a Docker label | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-viz | ||
docker images | ||
if [ "$(docker images -q $docker_tag 2> /dev/null)" == "" ]; then | ||
echo "Docker image $docker_tag does not exist." | ||
exit 1 | ||
else | ||
echo "FROM --platform=linux/amd64 $docker_tag" | \ | ||
docker build --label org.opencontainers.image.source=https://github.com/${{ github.repository }} -t $docker_tag - | ||
docker inspect --format='{{json .Config.Labels}}' $docker_tag | ||
fi | ||
- name: Push Docker image | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-viz | ||
remote_docker_tag=ghcr.io/${{ github.repository_owner }}/$docker_tag | ||
remote_docker_tag=${remote_docker_tag,,} | ||
docker tag $docker_tag $remote_docker_tag | ||
for i in 1 2 3; do | ||
if docker push $remote_docker_tag; then | ||
break | ||
fi | ||
echo "Retry $i pushing image..." | ||
sleep 10 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: docker-build-stage1 reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
soc: | ||
required: true | ||
type: string | ||
secrets: | ||
env_PAT: | ||
required: true | ||
|
||
env: | ||
# SDK_VER should match to the SDK_VER defined in docker/Makefile | ||
SDK_VER: 10.1.0.1 | ||
SDK_DIR: ${{ github.workspace }} | ||
GH_TOKEN: ${{ secrets.env_PAT }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.env_PAT }} | ||
|
||
- name: Verify the SDK repository | ||
run: ls -l $SDK_DIR | ||
|
||
- name: Set up Docker build script | ||
run: | | ||
mkdir -p $HOME/j7ros_home | ||
cd $HOME/j7ros_home | ||
makefile_path=${{ env.SDK_DIR }}/docker/Makefile | ||
if [ -f $makefile_path ]; then | ||
ln -snf $makefile_path . | ||
else | ||
echo "Error: $makefile_path does not exist" | ||
exit 1 | ||
fi | ||
PLATFORM=j7 SDK_DIR=${{ env.SDK_DIR }} make scripts | ||
- name: Verify script generation | ||
run: | | ||
ls -l $HOME/j7ros_home | ||
more $HOME/j7ros_home/docker_build.sh | ||
- name: Build Docker image | ||
run: | | ||
cd $HOME/j7ros_home | ||
SOC=${{ inputs.soc }} ./docker_build.sh stage1_only | ||
- name: Add a Docker label | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-base | ||
docker images | ||
if [ "$(docker images -q $docker_tag 2> /dev/null)" == "" ]; then | ||
echo "Docker image $docker_tag does not exist." | ||
exit 1 | ||
else | ||
echo "FROM --platform=linux/arm64 $docker_tag" | docker build --label org.opencontainers.image.source=https://github.com/${{ github.repository }} -t $docker_tag - | ||
docker inspect --format='{{json .Config.Labels}}' $docker_tag | ||
fi | ||
- name: Push Docker image | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-base | ||
remote_docker_tag=ghcr.io/${{ github.repository_owner }}/$docker_tag | ||
remote_docker_tag=${remote_docker_tag,,} | ||
docker tag $docker_tag $remote_docker_tag | ||
for i in 1 2 3; do | ||
if docker push $remote_docker_tag; then | ||
break | ||
fi | ||
echo "Retry $i pushing image..." | ||
sleep 10 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: docker-build-stage2 reusable | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
soc: | ||
required: true | ||
type: string | ||
secrets: | ||
env_PAT: | ||
required: true | ||
|
||
env: | ||
# SDK_VER should match to the SDK_VER defined in docker/Makefile | ||
SDK_VER: 10.1.0.1 | ||
SDK_DIR: ${{ github.workspace }} | ||
GH_TOKEN: ${{ secrets.env_PAT }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.env_PAT }} | ||
|
||
- name: Initial setup for the SDK repository | ||
run: | | ||
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_gscam.sh | ||
SDK_DIR=$SDK_DIR $SDK_DIR/scripts/install_mmwave_rospkg.sh 2 | ||
# verify | ||
ls -l $SDK_DIR/ros2/drivers | ||
- name: Set up Docker build script | ||
run: | | ||
mkdir -p $HOME/j7ros_home | ||
cd $HOME/j7ros_home | ||
makefile_path=${{ env.SDK_DIR }}/docker/Makefile | ||
if [ -f $makefile_path ]; then | ||
ln -snf $makefile_path . | ||
else | ||
echo "Error: $makefile_path does not exist" | ||
exit 1 | ||
fi | ||
PLATFORM=j7 SDK_DIR=${{ env.SDK_DIR }} make scripts | ||
- name: Verify script generation | ||
run: | | ||
ls -l $HOME/j7ros_home | ||
more $HOME/j7ros_home/docker_build.sh | ||
- name: Pull Docker image | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-base | ||
remote_docker_tag=ghcr.io/${{ github.repository_owner }}/$docker_tag | ||
remote_docker_tag=${remote_docker_tag,,} | ||
docker pull $remote_docker_tag | ||
docker tag $remote_docker_tag $docker_tag | ||
- name: Build Docker image | ||
run: | | ||
cd $HOME/j7ros_home | ||
SOC=${{ inputs.soc }} ./docker_build.sh stage2_only | ||
- name: Build and install the SDK ROS nodes | ||
run: | | ||
cd $HOME/j7ros_home | ||
# create docker_run_commit.sh | ||
script_file=docker_run_commit.sh | ||
cp docker_run.sh $script_file | ||
sed -i 's/docker run -it --rm \\/docker run --platform linux\/arm64 \\/' $script_file | ||
echo 'CONTAINER_ID=$(docker ps -a --filter "ancestor=$DOCKER_TAG" --format "{{.ID}}" | head -n 1)' >> $script_file | ||
echo 'docker tag $DOCKER_TAG ${DOCKER_TAG}-org' >> $script_file | ||
echo 'docker commit $CONTAINER_ID ${DOCKER_TAG}' >> $script_file | ||
more $script_file | ||
# build and install the SDK ROS nodes | ||
SOC=${{ inputs.soc }} ./docker_run_commit.sh colcon build \ | ||
--base-paths /opt/robotics_sdk/ros2 \ | ||
--cmake-force-configure \ | ||
--packages-skip ti_viz_nodes \ | ||
--install-base /opt/ros/robotics_sdk_install | ||
docker images | ||
- name: Add a Docker label | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-${{ inputs.soc }} | ||
docker images | ||
if [ "$(docker images -q $docker_tag 2> /dev/null)" == "" ]; then | ||
echo "Docker image $docker_tag does not exist." | ||
exit 1 | ||
else | ||
echo "FROM --platform=linux/arm64 $docker_tag" | \ | ||
docker build --label org.opencontainers.image.source=https://github.com/${{ github.repository }} -t $docker_tag - | ||
docker inspect --format='{{json .Config.Labels}}' $docker_tag | ||
fi | ||
- name: Push Docker image | ||
run: | | ||
docker_tag=robotics-sdk:${{ env.SDK_VER }}-humble-${{ inputs.soc }} | ||
remote_docker_tag=ghcr.io/${{ github.repository_owner }}/$docker_tag | ||
remote_docker_tag=${remote_docker_tag,,} | ||
docker tag $docker_tag $remote_docker_tag | ||
for i in 1 2 3; do | ||
if docker push $remote_docker_tag; then | ||
break | ||
fi | ||
echo "Retry $i pushing image..." | ||
sleep 10 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.