Skip to content

Commit

Permalink
Fix accidental prebuilt PyAV usage in the Dockerfile (#6573)
Browse files Browse the repository at this point in the history
When I integrated pip-compile, I neglected to notice that in the
generated `*.txt` files the --no-binary=av option is on its own line,
and therefore is stripped away by the sed command.

Hardcode this option in the Dockerfile to make sure we build PyAV from
source. Also, add a workaround for the fact that PyAV is incompatible
with the recently-released Cython 3.
  • Loading branch information
SpecLad authored Jul 31, 2023
1 parent 4c1ff85 commit c56f2e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- TDB
- Accidentally using prebuilt FFmpeg bundled in PyAV instead of the custom
build.

### Security

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ COPY utils/dataset_manifest/requirements.txt /tmp/utils/dataset_manifest/require
RUN grep -q '^av==' /tmp/utils/dataset_manifest/requirements.txt
RUN sed -i '/^av==/!d' /tmp/utils/dataset_manifest/requirements.txt

# Work around https://github.com/PyAV-Org/PyAV/issues/1140
RUN pip install setuptools wheel 'cython<3'

RUN --mount=type=cache,target=/root/.cache/pip/http \
python3 -m pip wheel \
python3 -m pip wheel --no-binary=av --no-build-isolation \
-r /tmp/utils/dataset_manifest/requirements.txt \
-w /tmp/wheelhouse

Expand Down

0 comments on commit c56f2e9

Please sign in to comment.