Skip to content

Commit

Permalink
Merge branch 'develop' into feature/e2e-test
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Aug 13, 2024
2 parents 45405d9 + 7a4aca3 commit 2881498
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 80 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## 2024.3.0

**日時**: 2024-08-02
**日時**: 2024-08-05

- [CHANGE] Jetson 5 の対応を削除
- 以降は support/jetson-jetpack-6 ブランチで Jetson 6 のみの対応となる
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ elseif(TARGET_OS STREQUAL "jetson")
"$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>"
"$<$<COMPILE_LANGUAGE:CXX>:-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)
Expand Down
20 changes: 14 additions & 6 deletions buildbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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")


Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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}")

Expand Down
1 change: 0 additions & 1 deletion examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
54 changes: 31 additions & 23 deletions examples/requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,39 @@
# generate-hashes: false
# universal: false

absl-py==1.4.0
-e file:.
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
ml-dtypes==0.2.0
# via sora-sdk-samples
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
Expand All @@ -50,35 +53,40 @@ 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
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
ruff==0.5.2
scipy==1.10.1
# via sora-sdk-samples
ruff==0.5.7
scipy==1.14.0
# 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
tomli==2.0.1
# via mypy
typing-extensions==4.10.0
typing-extensions==4.12.2
# via mypy
48 changes: 28 additions & 20 deletions examples/requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,36 @@
# generate-hashes: false
# universal: false

absl-py==1.4.0
-e file:.
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
ml-dtypes==0.2.0
# via sora-sdk-samples
ml-dtypes==0.4.0
# via jax
# via jaxlib
numpy==1.24.4
numpy==2.0.1
# via contourpy
# via jax
# via jaxlib
Expand All @@ -47,30 +50,35 @@ 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
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
scipy==1.10.1
# via sora-sdk-samples
scipy==1.14.0
# 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
23 changes: 0 additions & 23 deletions multistrap/ubuntu-20.04_armv8_jetson.conf

This file was deleted.

23 changes: 23 additions & 0 deletions multistrap/ubuntu-22.04_armv8_jetson.conf
Original file line number Diff line number Diff line change
@@ -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
14 changes: 11 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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}")

Expand Down Expand Up @@ -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 ファイルを生成する
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit 2881498

Please # to comment.