Skip to content
Merged
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
62 changes: 38 additions & 24 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM ubuntu:24.04 AS prod
FROM ros:jazzy-ros-base AS prod
ARG DEBIAN_FRONTEND=noninteractive
ARG L4T_RELEASE=r39.2
ARG CUDA_TOOLKIT_PKG=cuda-toolkit-13-2
Expand All @@ -11,28 +11,15 @@ ARG L4T_MINOR=2

ENV LANG=en_US.UTF-8 \
TZ=UTC \
PIXI_HOME=/opt/pixi \
PATH=/opt/pixi/bin:/usr/local/cuda/bin:${PATH} \
PATH=/usr/local/cuda/bin:${PATH} \
LD_LIBRARY_PATH=/usr/local/cuda/lib64 \
NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,video,utility

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
curl \
git \
gnupg2 \
less \
locales \
lsb-release \
openssh-client \
sudo \
tzdata \
udev \
wget \
zstd \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
&& ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
Expand Down Expand Up @@ -64,8 +51,15 @@ RUN wget -q --no-check-certificate -O /tmp/ZED_SDK_Linux.run \
&& rm -rf /tmp/ZED_SDK_Linux.run /usr/local/zed/resources/* \
&& ln -sf /usr/lib/aarch64-linux-gnu/tegra/libv4l2.so.0 /usr/lib/aarch64-linux-gnu/libv4l2.so

RUN curl -fsSL https://pixi.sh/install.sh | \
env PIXI_HOME=/opt/pixi PIXI_NO_PATH_UPDATE=1 bash
# ------------------------------------
# ROS packages used at runtime
# ------------------------------------

RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-rosbridge-server \
ros-jazzy-cv-bridge \
ros-jazzy-vision-opencv \
&& rm -rf /var/lib/apt/lists/*

RUN useradd trickfire \
--shell /bin/bash \
Expand All @@ -86,19 +80,26 @@ WORKDIR /home/trickfire/trickfire-urc
# Dev setup
# ------------------------------------

FROM ubuntu:24.04 AS dev
FROM ros:jazzy-ros-base AS dev

ENV LANG=en_US.UTF-8 \
TZ=UTC \
PIXI_HOME=/opt/pixi \
PATH=/opt/pixi/bin:${PATH}
TZ=UTC

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
clang-format \
clang-tidy \
clang-tools \
clangd \
cmake \
gdb \
git \
locales \
openssh-client \
pipx \
python3-pip \
shfmt \
sudo \
tzdata \
&& locale-gen en_US.UTF-8 \
Expand All @@ -107,8 +108,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& echo "${TZ}" > /etc/timezone \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://pixi.sh/install.sh | \
env PIXI_HOME=/opt/pixi PIXI_NO_PATH_UPDATE=1 bash
# ------------------------------------
# ROS packages used for development
# ------------------------------------

RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-desktop \
ros-jazzy-rosbridge-server \
ros-jazzy-cv-bridge \
ros-jazzy-vision-opencv \
ros-jazzy-pinocchio \
ros-jazzy-coal \
&& rm -rf /var/lib/apt/lists/*

RUN PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install ruff==0.15.14 \
&& chmod -R a+rX /opt/pipx

RUN useradd trickfire \
--shell /bin/bash \
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"remoteUser": "trickfire",
"workspaceFolder": "/home/trickfire/trickfire-urc",
"shutdownAction": "stopCompose",
"postCreateCommand": "pixi install",
"customizations": {
"vscode": {
"extensions": [
Expand Down
21 changes: 4 additions & 17 deletions .devcontainer/trickfire.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,10 @@ fi
# ---------- lesspipe ----------
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# ---------- pixi environment ----------
# Activates the workspace's pixi env (which provides ROS Jazzy via RoboStack
# plus the clang/ruff tooling). Run `pixi install` once after a fresh clone.
_tf_pixi_activate() {
local manifest="/home/trickfire/trickfire-urc/pixi.toml"
if [ -n "${PIXI_ENV_ACTIVATED:-}" ]; then
return 0
fi
if ! command -v pixi >/dev/null 2>&1 || [ ! -f "$manifest" ]; then
return 0
fi
local hook
hook="$(pixi shell-hook --manifest-path "$manifest" 2>/dev/null)" || return 0
eval "$hook"
export PIXI_ENV_ACTIVATED=1
}
_tf_pixi_activate
# ---------- ROS environment ----------
if [ -f /opt/ros/jazzy/setup.bash ]; then
source /opt/ros/jazzy/setup.bash
fi

# ---------- ROS workspace overlay ----------
_ros_source_env() {
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/cpp-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
- "**/*.hpp"
- "**/*.hxx"
- ".clang-format"
- "pixi.toml"
- "pixi.lock"
pull_request:
paths:
- "**/*.cpp"
Expand All @@ -23,25 +21,21 @@ on:
- "**/*.hpp"
- "**/*.hxx"
- ".clang-format"
- "pixi.toml"
- "pixi.lock"

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: lint
cache: true
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-format

- name: Check formatting
run: |
find . -type f \( \
-name "*.cpp" -o -name "*.cc" -o -name "*.cxx" -o \
-name "*.c" -o -name "*.h" -o -name "*.hpp" -o \
-name "*.hxx" \
\) -not -path "./.git/*" -not -path "*/build/*" -not -path "*/install/*" -not -path "*/.pixi/*" -print0 \
| xargs -0 --no-run-if-empty pixi run -e lint clang-format --dry-run --Werror
\) -not -path "./.git/*" -not -path "*/build/*" -not -path "*/install/*" -print0 \
| xargs -0 --no-run-if-empty clang-format --dry-run --Werror
14 changes: 4 additions & 10 deletions .github/workflows/python-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,22 @@ on:
paths:
- "**/*.py"
- "pyproject.toml"
- "pixi.toml"
- "pixi.lock"
pull_request:
paths:
- "**/*.py"
- "pyproject.toml"
- "pixi.toml"
- "pixi.lock"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: lint
cache: true
- name: Install ruff
run: pipx install ruff==0.15.14

- name: Ruff lint
run: pixi run -e lint ruff-check
run: ruff check .

- name: Ruff format check
run: pixi run -e lint ruff-format-check
run: ruff format --check .
32 changes: 19 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Basic
.DS_Store

# pixi
.pixi/

# trickfire-docs
dist/

# ZED SDK installers (large binaries; the prod Dockerfile stage downloads
# these itself, matched to the target L4T/CUDA version)
*.run
*.zstd.run
.DS_Store

# trickfire-docs
dist/

# python
__pycache__/

# zed
*.run
*.zstd.run

# colcon
install/
log/
build/

# test generated files
src-autonomy/ar_tag_detection/test/output_images/
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@

"editor.rulers": [100],
"files.exclude": {
// Pixi
"**/.pixi": true,

// General
"**/.git": true,
"**/.DS_Store": true,
Expand Down
Loading
Loading