Skip to content

Commit 9316cc7

Browse files
YLouWashUmeta-codesync[bot]
authored andcommitted
{Feature} CUDA Decoding - Install nv-codec-headers in manylinux wheel build (#385)
Summary: Pull Request resolved: #385 The cibuildwheel Linux build runs inside a manylinux container (`CIBW_BEFORE_BUILD_LINUX` -> `install_manylinux_deps.sh`). To build the `projectaria_tools` wheel with NVDEC GPU H.265 decode enabled, that container needs `nv-codec-headers` (provides the `ffnvcodec` pkg-config the XPRS NVDEC build links against). This adds a header-only clone+install of `nv-codec-headers` (tag `n12.1.14.0`, matching the internal Video Codec SDK) before the FFmpeg build. No CUDA toolkit is required at build time; the driver's `libcuda`/`libnvcuvid` are dlopen'd at runtime, so the wheel stays CUDA-agnostic. Prerequisite for enabling `PROJECTARIA_ENABLE_CUDA` in the cibuildwheel workflow (next diff in this stack). Reviewed By: kongchen1992 Differential Revision: D114393581 fbshipit-source-id: 4bb5de2ea40e94694cd076622a4b249093037d39
1 parent 756d341 commit 9316cc7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build_third_party_libs/install_manylinux_deps.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ cd /tmp && curl -kOL http://downloads.xiph.org/releases/opus/opus-1.5.2.tar.gz \
5454
&& make install \
5555
&& rm -rf /tmp/opus-1.5.2.tar.gz /tmp/opus-1.5.2 \
5656

57+
# Build nv-codec-headers (header-only) so XPRS can be built with NVDEC GPU
58+
# H.265 decode. No CUDA toolkit is needed at build time; the driver's
59+
# libcuda/libnvcuvid are dlopen'd at runtime, keeping the wheel CUDA-agnostic.
60+
cd /tmp && git clone --depth 1 --branch n12.1.14.0 https://github.com/FFmpeg/nv-codec-headers.git \
61+
&& make -C nv-codec-headers install PREFIX=/usr \
62+
&& rm -rf /tmp/nv-codec-headers;
63+
5764
# Build FFmpeg
5865
cd /project \
5966
&& ./build_third_party_libs/build_ffmpeg_linuxunix.sh

0 commit comments

Comments
 (0)