From da0409246a54b16ce49a06939733cb97b0705c83 Mon Sep 17 00:00:00 2001 From: voluntas Date: Mon, 5 Aug 2024 11:49:17 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A5=E6=99=82=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5f1d68fe..49ca28d4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,7 +13,7 @@ ## 2024.3.0 -**日時**: 2024-08-02 +**日時**: 2024-08-05 - [CHANGE] Jetson 5 の対応を削除 - 以降は support/jetson-jetpack-6 ブランチで Jetson 6 のみの対応となる From 9aa7198536b650587b68d2c897af4e63cdeb5885 Mon Sep 17 00:00:00 2001 From: melpon Date: Wed, 7 Aug 2024 03:04:05 +0900 Subject: [PATCH 2/4] =?UTF-8?q?JetPack=20=E5=90=91=E3=81=91=E3=83=96?= =?UTF-8?q?=E3=83=A9=E3=83=B3=E3=83=81=E3=81=AE=E6=BA=96=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 5 ++++- buildbase.py | 20 ++++++++++++++------ multistrap/ubuntu-20.04_armv8_jetson.conf | 23 ----------------------- multistrap/ubuntu-22.04_armv8_jetson.conf | 23 +++++++++++++++++++++++ run.py | 14 +++++++++++--- setup.py | 4 ++-- 6 files changed, 54 insertions(+), 35 deletions(-) delete mode 100644 multistrap/ubuntu-20.04_armv8_jetson.conf create mode 100644 multistrap/ubuntu-22.04_armv8_jetson.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c8cfd4b..69ac7fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,10 @@ elseif(TARGET_OS STREQUAL "jetson") "$<$:-nostdinc++>" "$<$:-isystem${LIBCXX_INCLUDE_DIR}>" ) - target_link_directories(sora_sdk_ext PRIVATE ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/tegra) + target_link_directories(sora_sdk_ext + PRIVATE + ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/tegra + ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/nvidia) elseif(TARGET_OS STREQUAL "windows") # 文字コードを utf-8 として扱うのと、シンボルテーブル数を増やす target_compile_options(sora_sdk_ext PRIVATE /utf-8 /bigobj) diff --git a/buildbase.py b/buildbase.py index b75a3ca2..42e6ce81 100644 --- a/buildbase.py +++ b/buildbase.py @@ -1630,10 +1630,11 @@ def install_spdlog(version, install_dir): class PlatformTarget(object): - def __init__(self, os, osver, arch): + def __init__(self, os, osver, arch, extra=None): self.os = os self.osver = osver self.arch = arch + self.extra = extra @property def package_name(self): @@ -1650,9 +1651,13 @@ def package_name(self): if self.os == "raspberry-pi-os": return f"raspberry-pi-os_{self.arch}" if self.os == "jetson": + if self.extra is None: + ubuntu_version = "ubuntu-20.04" + else: + ubuntu_version = self.extra if self.osver is None: - return "ubuntu-20.04_armv8_jetson" - return f"ubuntu-20.04_armv8_jetson_{self.osver}" + return f"{ubuntu_version}_armv8_jetson" + return f"{ubuntu_version}_armv8_jetson_{self.osver}" raise Exception("error") @@ -1766,9 +1771,9 @@ def _check_platform_target(self, p: PlatformTarget): else: self._check(p.arch in ("x86_64", "arm64")) - def __init__(self, target_os, target_osver, target_arch): + def __init__(self, target_os, target_osver, target_arch, target_extra=None): build = get_build_platform() - target = PlatformTarget(target_os, target_osver, target_arch) + target = PlatformTarget(target_os, target_osver, target_arch, target_extra) self._check_platform_target(build) self._check_platform_target(target) @@ -1819,7 +1824,10 @@ def get_webrtc_platform(platform: Platform) -> str: elif platform.target.os == "raspberry-pi-os": return f"raspberry-pi-os_{platform.target.arch}" elif platform.target.os == "jetson": - return "ubuntu-20.04_armv8" + if platform.target.extra is None: + return "ubuntu-20.04_armv8" + else: + return f"{platform.target.extra}_armv8" else: raise Exception(f"Unknown platform {platform.target.os}") diff --git a/multistrap/ubuntu-20.04_armv8_jetson.conf b/multistrap/ubuntu-20.04_armv8_jetson.conf deleted file mode 100644 index e8ee63a9..00000000 --- a/multistrap/ubuntu-20.04_armv8_jetson.conf +++ /dev/null @@ -1,23 +0,0 @@ -[General] -noauth=true -unpack=true -bootstrap=Ports Jetson T194 -aptsources=Ports Jetson T194 - -[Ports] -packages=libstdc++-10-dev libc6-dev libxext-dev libdbus-1-dev libdrm-dev libva-dev libpython3-dev python3 python3-pip libc-bin unzip -source=http://ports.ubuntu.com -suite=focal -components=main universe - -[Jetson] -packages= -source=https://repo.download.nvidia.com/jetson/common -suite=r35.4 -components=main - -[T194] -packages=nvidia-l4t-camera nvidia-l4t-jetson-multimedia-api -source=https://repo.download.nvidia.com/jetson/t194 -suite=r35.4 -components=main \ No newline at end of file diff --git a/multistrap/ubuntu-22.04_armv8_jetson.conf b/multistrap/ubuntu-22.04_armv8_jetson.conf new file mode 100644 index 00000000..be7ea103 --- /dev/null +++ b/multistrap/ubuntu-22.04_armv8_jetson.conf @@ -0,0 +1,23 @@ +[General] +noauth=true +unpack=true +bootstrap=Ports Jetson T234 +aptsources=Ports Jetson T234 + +[Ports] +packages=libstdc++-10-dev libc6-dev libxext-dev libdbus-1-dev +source=http://ports.ubuntu.com +suite=jammy +components=main universe + +[Jetson] +packages=nvidia-jetpack +source=https://repo.download.nvidia.com/jetson/common +suite=r36.3 +components=main + +[T234] +packages=nvidia-l4t-camera nvidia-l4t-multimedia +source=https://repo.download.nvidia.com/jetson/t234 +suite=r36.3 +components=main diff --git a/run.py b/run.py index 2331577d..17d4f814 100644 --- a/run.py +++ b/run.py @@ -169,7 +169,13 @@ def install_deps( apply_patch(patch, nanobind_include_dir, 1) -AVAILABLE_TARGETS = ["windows_x86_64", "macos_arm64", "ubuntu-22.04_x86_64", "ubuntu-24.04_x86_64"] +AVAILABLE_TARGETS = [ + "windows_x86_64", + "macos_arm64", + "ubuntu-22.04_x86_64", + "ubuntu-24.04_x86_64", + "ubuntu-22.04_armv8_jetson", +] def main(): @@ -193,6 +199,8 @@ def main(): platform = Platform("ubuntu", "22.04", "x86_64") elif args.target == "ubuntu-24.04_x86_64": platform = Platform("ubuntu", "24.04", "x86_64") + elif args.target == "ubuntu-22.04_armv8_jetson": + platform = Platform("jetson", None, "armv8", "ubuntu-22.04") else: raise Exception(f"Unknown target {args.target}") @@ -275,8 +283,8 @@ def main(): "-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH", f"-DCMAKE_SYSROOT={sysroot}", f"-DLIBCXX_INCLUDE_DIR={cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include'))}", - f"-DPython_ROOT_DIR={cmake_path(os.path.join(sysroot, 'usr', 'include', 'python3.9'))}", - "-DNB_SUFFIX=.cpython-38-aarch64-linux-gnu.so", + f"-DPython_ROOT_DIR={cmake_path(os.path.join(sysroot, 'usr', 'include', 'python3.10'))}", + "-DNB_SUFFIX=.cpython-310-aarch64-linux-gnu.so", ] # Windows 以外の、クロスコンパイルでない環境では pyi ファイルを生成する diff --git a/setup.py b/setup.py index c77f97af..7db2aa90 100644 --- a/setup.py +++ b/setup.py @@ -52,8 +52,8 @@ def main(): target = os.getenv("SORA_SDK_TARGET") if target is None: target_platform = build_platform - elif target == "ubuntu-20.04_armv8_jetson": - target_platform = PlatformTarget("jetson", None, "armv8") + elif target == "ubuntu-22.04_armv8_jetson": + target_platform = PlatformTarget("jetson", None, "armv8", "ubuntu-22.04") else: raise Exception(f"Unknown target {target}") From ce9af40a66d7dd0addba7ddc14590110ce9c3157 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 13 Aug 2024 11:12:37 +0900 Subject: [PATCH 3/4] =?UTF-8?q?virtual=20=3D=20true=20=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/pyproject.toml | 1 - examples/requirements-dev.lock | 7 +++++++ examples/requirements.lock | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/pyproject.toml b/examples/pyproject.toml index 01efbe25..de6ddfc6 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -27,7 +27,6 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.rye] -virtual = true managed = true dev-dependencies = ["ruff>=0.5", "mypy>=1.10.0"] diff --git a/examples/requirements-dev.lock b/examples/requirements-dev.lock index e183128a..4c8fd36a 100644 --- a/examples/requirements-dev.lock +++ b/examples/requirements-dev.lock @@ -9,6 +9,7 @@ # generate-hashes: false # universal: false +-e file:. absl-py==1.4.0 # via mediapipe attrs==23.1.0 @@ -32,6 +33,7 @@ kiwisolver==1.4.4 matplotlib==3.7.2 # via mediapipe mediapipe==0.10.14 + # via sora-sdk-samples ml-dtypes==0.2.0 # via jax # via jaxlib @@ -53,7 +55,9 @@ numpy==1.24.4 opencv-contrib-python==4.8.0.74 # via mediapipe opencv-python==4.10.0.84 + # via sora-sdk-samples opencv-python-headless==4.10.0.84 + # via sora-sdk-samples opt-einsum==3.3.0 # via jax packaging==23.1 @@ -69,6 +73,7 @@ pyparsing==3.0.9 python-dateutil==2.8.2 # via matplotlib python-dotenv==1.0.1 + # via sora-sdk-samples ruff==0.5.2 scipy==1.10.1 # via jax @@ -76,8 +81,10 @@ scipy==1.10.1 six==1.16.0 # via python-dateutil sora-sdk==2024.3.0 + # via sora-sdk-samples sounddevice==0.4.7 # via mediapipe + # via sora-sdk-samples tomli==2.0.1 # via mypy typing-extensions==4.10.0 diff --git a/examples/requirements.lock b/examples/requirements.lock index 11c07b91..e6da1494 100644 --- a/examples/requirements.lock +++ b/examples/requirements.lock @@ -9,6 +9,7 @@ # generate-hashes: false # universal: false +-e file:. absl-py==1.4.0 # via mediapipe attrs==23.1.0 @@ -32,6 +33,7 @@ kiwisolver==1.4.4 matplotlib==3.7.2 # via mediapipe mediapipe==0.10.14 + # via sora-sdk-samples ml-dtypes==0.2.0 # via jax # via jaxlib @@ -50,7 +52,9 @@ numpy==1.24.4 opencv-contrib-python==4.8.0.74 # via mediapipe opencv-python==4.10.0.84 + # via sora-sdk-samples opencv-python-headless==4.10.0.84 + # via sora-sdk-samples opt-einsum==3.3.0 # via jax packaging==23.1 @@ -66,11 +70,14 @@ pyparsing==3.0.9 python-dateutil==2.8.2 # via matplotlib python-dotenv==1.0.1 + # via sora-sdk-samples scipy==1.10.1 # via jax # via jaxlib six==1.16.0 # via python-dateutil sora-sdk==2024.3.0 + # via sora-sdk-samples sounddevice==0.4.7 # via mediapipe + # via sora-sdk-samples From 7a4aca36745e42a96c1c8856500e45338268b8b9 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 13 Aug 2024 16:04:57 +0900 Subject: [PATCH 4/4] =?UTF-8?q?examples=20=E3=81=AE=20rye=20sync=20--updat?= =?UTF-8?q?e-all=20=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/requirements-dev.lock | 47 +++++++++++++++++----------------- examples/requirements.lock | 41 ++++++++++++++--------------- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/examples/requirements-dev.lock b/examples/requirements-dev.lock index 4c8fd36a..24c08253 100644 --- a/examples/requirements-dev.lock +++ b/examples/requirements-dev.lock @@ -10,37 +10,38 @@ # universal: false -e file:. -absl-py==1.4.0 +absl-py==2.1.0 # via mediapipe -attrs==23.1.0 +attrs==24.2.0 # via mediapipe -cffi==1.15.1 +cffi==1.17.0 # via sounddevice -contourpy==1.1.0 +contourpy==1.2.1 # via matplotlib -cycler==0.11.0 +cycler==0.12.1 # via matplotlib -flatbuffers==23.5.26 +flatbuffers==24.3.25 # via mediapipe -fonttools==4.40.0 +fonttools==4.53.1 # via matplotlib -jax==0.4.13 +jax==0.4.31 # via mediapipe -jaxlib==0.4.13 +jaxlib==0.4.31 + # via jax # via mediapipe -kiwisolver==1.4.4 +kiwisolver==1.4.5 # via matplotlib -matplotlib==3.7.2 +matplotlib==3.9.2 # via mediapipe mediapipe==0.10.14 # via sora-sdk-samples -ml-dtypes==0.2.0 +ml-dtypes==0.4.0 # via jax # via jaxlib -mypy==1.10.1 +mypy==1.11.1 mypy-extensions==1.0.0 # via mypy -numpy==1.24.4 +numpy==2.0.1 # via contourpy # via jax # via jaxlib @@ -52,7 +53,7 @@ numpy==1.24.4 # via opencv-python-headless # via opt-einsum # via scipy -opencv-contrib-python==4.8.0.74 +opencv-contrib-python==4.10.0.84 # via mediapipe opencv-python==4.10.0.84 # via sora-sdk-samples @@ -60,22 +61,22 @@ opencv-python-headless==4.10.0.84 # via sora-sdk-samples opt-einsum==3.3.0 # via jax -packaging==23.1 +packaging==24.1 # via matplotlib -pillow==10.0.0 +pillow==10.4.0 # via matplotlib protobuf==4.25.4 # via mediapipe -pycparser==2.21 +pycparser==2.22 # via cffi -pyparsing==3.0.9 +pyparsing==3.1.2 # via matplotlib -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via matplotlib python-dotenv==1.0.1 # via sora-sdk-samples -ruff==0.5.2 -scipy==1.10.1 +ruff==0.5.7 +scipy==1.14.0 # via jax # via jaxlib six==1.16.0 @@ -87,5 +88,5 @@ sounddevice==0.4.7 # via sora-sdk-samples tomli==2.0.1 # via mypy -typing-extensions==4.10.0 +typing-extensions==4.12.2 # via mypy diff --git a/examples/requirements.lock b/examples/requirements.lock index e6da1494..ef3b7c0d 100644 --- a/examples/requirements.lock +++ b/examples/requirements.lock @@ -10,34 +10,35 @@ # universal: false -e file:. -absl-py==1.4.0 +absl-py==2.1.0 # via mediapipe -attrs==23.1.0 +attrs==24.2.0 # via mediapipe -cffi==1.15.1 +cffi==1.17.0 # via sounddevice -contourpy==1.1.0 +contourpy==1.2.1 # via matplotlib -cycler==0.11.0 +cycler==0.12.1 # via matplotlib -flatbuffers==23.5.26 +flatbuffers==24.3.25 # via mediapipe -fonttools==4.40.0 +fonttools==4.53.1 # via matplotlib -jax==0.4.13 +jax==0.4.31 # via mediapipe -jaxlib==0.4.13 +jaxlib==0.4.31 + # via jax # via mediapipe -kiwisolver==1.4.4 +kiwisolver==1.4.5 # via matplotlib -matplotlib==3.7.2 +matplotlib==3.9.2 # via mediapipe mediapipe==0.10.14 # via sora-sdk-samples -ml-dtypes==0.2.0 +ml-dtypes==0.4.0 # via jax # via jaxlib -numpy==1.24.4 +numpy==2.0.1 # via contourpy # via jax # via jaxlib @@ -49,7 +50,7 @@ numpy==1.24.4 # via opencv-python-headless # via opt-einsum # via scipy -opencv-contrib-python==4.8.0.74 +opencv-contrib-python==4.10.0.84 # via mediapipe opencv-python==4.10.0.84 # via sora-sdk-samples @@ -57,21 +58,21 @@ opencv-python-headless==4.10.0.84 # via sora-sdk-samples opt-einsum==3.3.0 # via jax -packaging==23.1 +packaging==24.1 # via matplotlib -pillow==10.0.0 +pillow==10.4.0 # via matplotlib protobuf==4.25.4 # via mediapipe -pycparser==2.21 +pycparser==2.22 # via cffi -pyparsing==3.0.9 +pyparsing==3.1.2 # via matplotlib -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via matplotlib python-dotenv==1.0.1 # via sora-sdk-samples -scipy==1.10.1 +scipy==1.14.0 # via jax # via jaxlib six==1.16.0