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
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']
python-architecture: [x64, x86]
fail-fast: false
steps:
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12']
fail-fast: false
steps:
- name: Cache .hunter folder
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
# echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV

- name: Build wheels
run: for PYBIN in {9..11}; do "python3.${PYBIN}" -m pip wheel . -w wheelhouse/ --verbose; done
run: for PYBIN in {9..12}; do "python3.${PYBIN}" -m pip wheel . -w wheelhouse/ --verbose; done

- name: Auditing wheels
run: delocate-wheel -v -w wheelhouse/audited wheelhouse/*.whl
Expand All @@ -352,7 +352,7 @@ jobs:
needs: build-docstrings
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64:2022-10-30-402504a
image: quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed
env:
PLAT: manylinux2014_x86_64
steps:
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
/opt/python/cp38-cp38/bin/python3.8 setup.py sdist --formats=gztar
mv dist/* wheelhouse/audited/
- name: Build wheels
run: for PYBIN in /opt/python/cp3{6..11}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
run: for PYBIN in /opt/python/cp3{6..12}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
- name: Audit wheels
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
- name: Archive wheel artifacts
Expand All @@ -416,7 +416,7 @@ jobs:
needs: build-docstrings
runs-on: [self-hosted, linux, ARM64]
container:
image: quay.io/pypa/manylinux2014_aarch64:2022-10-30-402504a
image: quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed
env:
PLAT: manylinux2014_aarch64
# Mount local hunter cache directory, instead of transfering to Github and back
Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
- name: Building wheels
run: for PYBIN in /opt/python/cp3{6..11}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
run: for PYBIN in /opt/python/cp3{6..12}*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
- name: Auditing wheels
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
- name: Archive wheel artifacts
Expand Down Expand Up @@ -573,4 +573,4 @@ jobs:
workflow_timeout_seconds: 300 # was 120 Default: 300

- name: Release
run: echo "https://github.com/luxonis/depthai-core-hil-tests/actions/runs/${{steps.return_dispatch.outputs.run_id}}" >> $GITHUB_STEP_SUMMARY
run: echo "https://github.com/luxonis/depthai-core-hil-tests/actions/runs/${{steps.return_dispatch.outputs.run_id}}" >> $GITHUB_STEP_SUMMARY
24 changes: 19 additions & 5 deletions .github/workflows/test-install-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
runs-on: ubuntu-latest
strategy:
matrix:
container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:22.10"]
container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:rolling"]
container:
image: ${{ matrix.container_image }}
steps:
Expand All @@ -32,13 +32,23 @@
ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone # Otherwise tzdata installer prompts for user input
sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/source/_static/install_dependencies.sh > tmp_script.sh # Doesn't work on docker
bash tmp_script.sh
- name: Create a virtual environment
if: endsWith(matrix.container_image, 'rolling') == true
run: |
sudo apt-get install -y python3-venv
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
python3 examples/install_requirements.py
shell: bash
- name: Install example requirements
if: endsWith(matrix.container_image, 'rolling') == false
run: |
python3 examples/install_requirements.py
test_macos:
strategy:
matrix:
os: ["macos-11", "macos-12"]
os: ["macos-11", "macos-12", "macos-13", "macos-14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -53,12 +63,16 @@
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Download chocolatey
shell: pwsh
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- name: Install dependencies
- name: Install pycharm-community dependency
shell: pwsh
run: choco install cmake git python --version 3.10 -y
- name: Install example requrirements
run: choco install pycharm-community -y
- name: Install example requirements
run: |
python examples/install_requirements.py

Binary file modified docs/source/_static/images/components/device_timesync.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 143 additions & 43 deletions docs/source/_static/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readonly linux_pkgs=(
python3-numpy
)

readonly ubuntu_pkgs=(
readonly debian_pkgs=(
${linux_pkgs[@]}
# https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
build-essential
Expand All @@ -22,7 +22,6 @@ readonly ubuntu_pkgs=(
libavformat-dev
libswscale-dev
python3-dev
libtbb2
libtbb-dev
libjpeg-dev
libpng-dev
Expand All @@ -31,7 +30,6 @@ readonly ubuntu_pkgs=(
ffmpeg
libsm6
libxext6
libgl1-mesa-glx
python3-pyqt5
python3-pyqt5.qtquick
qml-module-qtquick-controls2
Expand All @@ -46,30 +44,65 @@ readonly ubuntu_pkgs=(
qml-module-qtquick-window2
)

readonly ubuntu_pkgs_pre22_04=(
"${ubuntu_pkgs[@]}"
libdc1394-22-dev
)

readonly ubuntu_pkgs_post22_04=(
"${ubuntu_pkgs[@]}"
libdc1394-dev
)

readonly ubuntu_arm_pkgs=(
"${ubuntu_pkgs[@]}"
libdc1394-22-dev
readonly debian_arm_pkgs=(
${linux_pkgs[@]}
# https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
build-essential
libgtk2.0-dev
pkg-config
libavcodec-dev
libavformat-dev
libswscale-dev
python3-dev
libtbb-dev
libjpeg-dev
libpng-dev
libtiff-dev
# https://stackoverflow.com/questions/55313610
ffmpeg
libsm6
libxext6
python3-pyqt5
python3-pyqt5.qtquick
qml-module-qtquick-controls2
qml-module-qt-labs-platform
qtdeclarative5-dev
qml-module-qtquick2
qtbase5-dev
qtchooser
qt5-qmake
qtbase5-dev-tools
qml-module-qtquick-layouts
qml-module-qtquick-window2
# https://stackoverflow.com/a/53402396/5494277
libhdf5-dev
libhdf5-dev
libatlas-base-dev
libjasper-dev
# https://github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi/issues/18#issuecomment-433953426
libilmbase-dev
libopenexr-dev
libgstreamer1.0-dev
)

readonly debian_pkgs_pre22_04=(
libdc1394-22-dev
libgl1-mesa-glx
libtbb2

)
readonly debian_pkgs_post22_04=(
libdc1394-dev
libgl1-mesa-glx
libtbbmalloc2

)
readonly debian_pkgs_23=(
libdc1394-dev
libgl1-mesa-dev
libtbbmalloc2
)


readonly fedora_pkgs=(
${linux_pkgs[@]}
gtk2-devel
Expand All @@ -94,6 +127,33 @@ print_and_exec () {
$*
}

version_lte() {
[[ "$1" == "$(echo -e "$1\n$2" | sort -V | head -n1)" ]]
}

declare -A debian_versions=(
["trixie/sid"]="13"
["bookworm/sid"]="12"
["bullseye/sid"]="11"
["buster/sid"]="10"
["stretch/sid"]="9"
["jessie/sid"]="8"
["wheezy/sid"]="7"
["squeeze/sid"]="6"
)

# Function to lookup and print Debian version number
lookup_debian_version_number() {
debian_version_string="$1"
version_number="${debian_versions[$debian_version_string]}"

if [ -n "$version_number" ]; then
echo "$version_number"
else
echo "None"
fi
}

if [[ $(uname) == "Darwin" ]]; then
echo "During Homebrew install, certain commands need 'sudo'. Requesting access..."
sudo true
Expand All @@ -105,46 +165,87 @@ if [[ $(uname) == "Darwin" ]]; then
echo
echo "=== Installed successfully! IMPORTANT: For changes to take effect,"
echo "please close and reopen the terminal window, or run: exec \$SHELL"

elif [ -f /etc/os-release ]; then
# shellcheck source=/etc/os-release
source /etc/os-release
if [ -f /etc/debian_version ]; then
output=$(cat /etc/debian_version)
echo $output
if [[ $output == *sid ]]; then
version=$(lookup_debian_version_number $output)
else
version=$output
fi

# Correctly determine if the architecture is ARM or aarch64
IS_ARM=false
if [[ $(uname -m) =~ ^arm* || $(uname -m) == "aarch64" ]]; then
IS_ARM=true
fi

echo "$version"
echo "$IS_ARM"

if [ $IS_ARM ]; then
sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_arm_pkgs[@]}"
if [[ $version == 13* ]]; then
echo "Detected ARM Debian 13"
sudo apt install -y "${debian_pkgs_23[@]}"
elif version_lte "$version" "11.99"; then
echo "Using pre-22.04 ARM package list"
sudo apt-get install -y ${debian_pkgs_pre22_04[@]}

# Check for uvcdynctrl package and recommend removal if found
if dpkg -s uvcdynctrl &> /dev/null; then
echo -e "\033[33mWe detected 'uvcdynctrl' installed on your system.\033[0m"
# Instructions for removal
echo -e "\033[33m$ sudo apt remove uvcdynctrl uvcdynctrl-data\033[0m"
echo -e "\033[33m$ sudo rm -f /var/log/uvcdynctrl-udev.log\033[0m"
fi


if [[ "$ID" == "ubuntu" || "$ID" == "debian" || "$ID_LIKE" == "ubuntu" || "$ID_LIKE" == "debian" || "$ID_LIKE" == "ubuntu debian" ]]; then
if [[ ! $(uname -m) =~ ^arm* ]]; then
sudo apt-get update
if [[ "$VERSION_ID" > "22.04" || "$VERSION_ID" == "22.04" ]]; then
sudo apt-get install -y "${ubuntu_pkgs_post22_04[@]}"
else
sudo apt-get install -y "${ubuntu_pkgs_pre22_04[@]}"
echo "Using post-22.04 ARM package list"
sudo apt-get install -y ${debian_pkgs_post22_04[@]}
fi

# Add libjasper-dev for ARM but not aarch64
[[ $(uname -m) =~ ^arm* ]] && { sudo apt install -y libjasper-dev; }

else
sudo DEBIAN_FRONTEND=noninteractive apt install -y "${debian_pkgs[@]}"
if [[ $version == 13* ]]; then
echo "Detected Debian 13"
sudo apt install -y "${debian_pkgs_23[@]}"
elif version_lte "$version" "11.99"; then
echo "Using pre-22.04 package list"
sudo apt-get install -y "${debian_pkgs_pre22_04[@]}"

else
echo "Using post-22.04 package list"
sudo apt-get install -y "${debian_pkgs_post22_04[@]}"
fi
python3 -m pip install --upgrade pip
elif [[ $(uname -m) =~ ^arm* ]]; then
sudo apt-get update
sudo apt-get install -y "${ubuntu_arm_pkgs[@]}"
python3 -m pip install --upgrade pip
fi

# As set -e is set, retrieve the return value without exiting
RET=0
dpkg -s uvcdynctrl > /dev/null 2>&1 || RET=$? || true
# is uvcdynctrl installed
if [[ "$RET" == "0" ]]; then
echo -e "\033[33mWe detected \"uvcdynctrl\" installed on your system. \033[0m"
echo -e "\033[33mWe recommend removing this package, as it creates a huge log files if a camera is used in UVC mode (webcam)\033[0m"
echo -e "\033[33mYou can do so by running the following commands:\033[0m"
echo -e "\033[33m$ sudo apt remove uvcdynctrl uvcdynctrl-data\033[0m"
echo -e "\033[33m$ sudo rm -f /var/log/uvcdynctrl-udev.log\033[0m"
echo ""
# Check for uvcdynctrl package and recommend removal if found
if dpkg -s uvcdynctrl &> /dev/null; then
echo -e "\033[33mWe detected 'uvcdynctrl' installed on your system.\033[0m"
# Instructions for removal
echo -e "\033[33m$ sudo apt remove uvcdynctrl uvcdynctrl-data\033[0m"
echo -e "\033[33m$ sudo rm -f /var/log/uvcdynctrl-udev.log\033[0m"
fi

OS_VERSION=$(lsb_release -r |cut -f2)
if [ "$OS_VERSION" == "21.04" ]; then


if [ "$VERSION_ID" == "21.04" ]; then
echo -e "\033[33mThere are known issues with running our demo script on Ubuntu 21.04, due to package \"python3-pyqt5.sip\" not being in a correct version (>=12.9)\033[0m"
echo -e "\033[33mWe recommend installing the updated version manually using the following commands\033[0m"
echo -e "\033[33m$ wget http://mirrors.kernel.org/ubuntu/pool/universe/p/pyqt5-sip/python3-pyqt5.sip_12.9.0-1_amd64.deb\033[0m"
echo -e "\033[33m$ sudo dpkg -i python3-pyqt5.sip_12.9.0-1_amd64.deb\033[0m"
echo ""
fi


elif [[ "$ID" == "fedora" ]]; then
sudo dnf update -y
sudo dnf install -y "${fedora_pkgs[@]}"
Expand All @@ -154,7 +255,6 @@ elif [ -f /etc/os-release ]; then
echo "ERROR: Distribution not supported"
exit 99
fi

# Allow all users to read and write to Myriad X devices
echo "Installing udev rules..."
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion docs/source/components/device.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ subnet, you can specify the device (either with MxID, IP, or USB port name) you
# ...

Host clock syncing
==================
##################

When depthai library connects to a device, it automatically syncs device's timestamp to host's timestamp. Timestamp syncing happens continuously at around 5 second intervals,
and can be configured via API (example script below).
Expand Down
Loading