Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add optional Spectacular AI SDK to RAE build #28

Open
wants to merge 2 commits into
base: humble
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/main.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
ROS_DISTRO=${{ env.ROS_DISTRO }}
USE_RVIZ=1
SIM=1
INCLUDE_SPECTACULARAI_ROS=YES
secrets: |
"SPECTACULAR_AI_TOKEN=${{ secrets.SPECTACULAR_AI_TOKEN }}"
platforms: |
amd64
no-cache: true
Expand All @@ -57,6 +60,9 @@ jobs:
build-args: |
ROS_DISTRO=${{ env.ROS_DISTRO }}
USE_RVIZ=1
INCLUDE_SPECTACULARAI_ROS=YES
secrets: |
"SPECTACULAR_AI_TOKEN=${{ secrets.SPECTACULAR_AI_TOKEN }}"
platforms: |
amd64
push: ${{ env.PUSH }}
Expand All @@ -72,6 +78,9 @@ jobs:
ROS_DISTRO=${{ env.ROS_DISTRO }}
USE_RVIZ=0
SIM=0
INCLUDE_SPECTACULARAI_ROS=YES
secrets: |
"SPECTACULAR_AI_TOKEN=${{ secrets.SPECTACULAR_AI_TOKEN }}"
platforms: |
arm64
no-cache: true
Expand All @@ -84,6 +93,9 @@ jobs:
ROS_DISTRO=${{ env.ROS_DISTRO }}
USE_RVIZ=0
SIM=0
INCLUDE_SPECTACULARAI_ROS=YES
secrets: |
"SPECTACULAR_AI_TOKEN=${{ secrets.SPECTACULAR_AI_TOKEN }}"
platforms: |
arm64
push: ${{ env.PUSH }}
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM luxonis/depthai-ros-rae AS builder
ARG SIM=0
ARG CORE_NUM=1
ARG BUILD_TYPE="RelWithDebInfo"
ARG INCLUDE_SPECTACULARAI_ROS=NO
ARG SPECTACULARAI_ROS_VERSION=v0.0.1

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
Expand All @@ -22,6 +24,17 @@ RUN echo "if [ -f ${WS}/install/setup.zsh ]; then source ${WS}/install/setup.zsh
RUN echo 'eval "$(register-python-argcomplete3 ros2)"' >> $HOME/.zshrc
RUN echo 'eval "$(register-python-argcomplete3 colcon)"' >> $HOME/.zshrc
RUN echo "if [ -f ${WS}/install/setup.bash ]; then source ${WS}/install/setup.bash; fi" >> $HOME/.bashrc

RUN --mount=type=secret,id=SPECTACULAR_AI_TOKEN if [ "$INCLUDE_SPECTACULARAI_ROS" = "YES" ]; then \
rm -rf sai_ros \
&& git clone --single-branch --branch ${SPECTACULARAI_ROS_VERSION} https://github.com/SpectacularAI/ros.git sai_ros \
&& cd sai_ros \
&& apt-get -y install unzip --no-install-recommends \
&& ROS_DISTRO=$ROS_DISTRO DEPTHAI_WS=$UNDERLAY_WS GITHUB_RAE_PAT_TOKEN=$(cat /run/secrets/SPECTACULAR_AI_TOKEN) . ./scripts/download_and_build_static.sh \
&& apt-get -y remove unzip \
&& echo "if [ -f $(pwd)/spectacularai_ros2/install/setup.bash ]; then source $(pwd)/spectacularai_ros2/install/setup.bash; fi" >> $HOME/.bashrc; \
fi

ENTRYPOINT [ "/ws/src/rae-ros/entrypoint.sh" ]
RUN rm -rf /usr/share/doc

Expand Down