Conversation
torchcodec is PyTorch's video decoder: a scikit-build-core/CMake project that compiles a C++20 core against libtorch and FFmpeg, plus a separate, FFmpeg-free image-decoder library. Upstream links its wheels against prebuilt non-GPL FFmpeg tarballs it hosts on S3, which carry no riscv64 build, so the workflow takes the project's other supported path -- pkg-config against an installed FFmpeg -- and builds that FFmpeg from source in the container, LGPL and never shipped. FFmpeg 6.1 because the major version is baked into the libtorchcodec_core<N>.so name the Python loader dlopen()s, and 6.1 is what ubuntu-24.04-riscv ships. AVIF and HEIC image decoding are off: libavif comes from the same S3 bucket and libheif is packaged in neither Rocky 10 nor a riscv64 EPEL. JPEG, PNG, WebP and the vendored giflib are built as usual. Also records two reusable gotchas found along the way (383, 384).
luhenry
added a commit
that referenced
this pull request
Sep 19, 2026
RPM installs %license files regardless of tsflags=nodocs (only %doc is dropped), and all four packages whose licences the wheel needs mark them %license -- confirmed against the CentOS Stream 10 spec files, which are also where `%files devel` confirms libwebp-devel ships the CMake package config find_package(WebP) needs. The reinstall stays as belt-and-braces but must not fail the build when a package is no longer available from a repo.
Restores skills/python-project-porting/references/{gotchas-index.md,
gotchas/local-validation-and-rehearsal.md, gotchas/native-deps-and-linking.md}
to main's current content. The two gotchas this PR had added (383/384,
torch+CUDA rehearsal and versioned-dlopen ABI contract) also collided with
gotcha numbers other agents had already taken on main in the meantime -
they'll be re-added on main directly with fresh numbers instead.
luhenry
added a commit
that referenced
this pull request
Sep 19, 2026
These were originally added inside PR #2105 (torchcodec), which is not allowed to touch skills/ - removed from that branch and landed here instead, renumbered from their original 383/384 (already taken by other concurrent work by the time this was caught).
…is branch no longer touches # Conflicts: # skills/python-project-porting/references/gotchas-index.md # skills/python-project-porting/references/gotchas/local-validation-and-rehearsal.md
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
torchcodec0.16.0Compiles PyTorch's video decoder: a C++20 core linked against libtorch and FFmpeg, plus a separate FFmpeg-free image-decoder library. Upstream publishes no riscv64 wheel.
Mirrors upstream's
linux_wheel.yaml.Differs from upstream
libtorchcodec_core6.somatches ubuntu-24.04-riscv's system FFmpeg.TORCHCODEC_BUILD_AVIF=0,TORCHCODEC_BUILD_HEIC=0- libavif comes from the same bucket, libheif is in neither Rocky 10 nor a riscv64 EPEL.Testing
torchvisionnot on the registry, sotest_transform_ops.pyis deselected.License: Wheel bundles libjpeg-turbo, libpng, zlib and libwebp (all permissive); upstream ships their licence texts from its own repair script, which this build does not use, so the build adds them.
Patches
0001-pyproject-glob-the-licence-texts-of-the-bundled-image.patch-Upstream-Status: Inappropriate. Without it PEP 639's explicitlicense-fileslist silently drops the vendored-library licence texts. Not riscv64-specific, but only meaningful for a plain-auditwheel repair.Not built locally: the manylinux riscv64 image is unreachable from this host, and an x86 rehearsal of a libtorch project needs a CPU-only torch that PyPI does not serve. First CI run is the first build.