Skip to content

updated dockerfile manylinux#6236

Open
HarishPermal wants to merge 2 commits intogoogle-ai-edge:masterfrom
HarishPermal:harish_Dockerfile_manylinux
Open

updated dockerfile manylinux#6236
HarishPermal wants to merge 2 commits intogoogle-ai-edge:masterfrom
HarishPermal:harish_Dockerfile_manylinux

Conversation

@HarishPermal
Copy link
Copy Markdown

This PR is focused on making the manylinux wheel build reproducible and more resilient in a minimal environment, while making Python imports degrade gracefully when optional native/task components are missing. It also switches OpenCV to static linking for wheels and disables GenAI converter targets that are likely unavailable in the build environment

1. Dockerfile.manylinux_2_28_x86_64

  • Java 11 -> Java 21 and explicit JAVA_HOME: aligns with newer Bazel/JDK expectations and avoids build issues on newer toolchains.
  • Bazel install switched from source build to prebuilt binary: speeds up the container build and reduces build-time dependencies.
  • Added GCC toolset 14 include/lib paths and Bazel link opts: needed for C++20 std::span support and newer libstdc++ in manylinux.
  • Protobuf protoc version bumped to 28.3: aligns with newer protobuf expectations in the build.
    *OpenCV build excludes opencv_apps: trims build time and avoids extra deps.
  • .bazelrc gets explicit toolchain/linker env to ensure Bazel uses the newer libstdc++.
  • Patch for OpenCV dependency reduction now optional via MEDIAPIPE_PYTHON_BUILD_DIFF_URL: lets the Docker build continue even if the diff isn’t present.
  • GenAI converter targets removed and ENABLE_ODML_CONVERTER=0: avoids building GenAI converter components not needed for wheel build or missing deps.

2. build_manylinux_wheel.sh

  • New helper script to build the manylinux image and extract wheel(s) to ./wheelhouse. This is a convenience wrapper for the container build and wheel extraction.

3. third_party/BUILD

  • OPENCV_SHARED_LIBS = False: forces static OpenCV linking, which is preferred for manylinux wheels to reduce runtime shared library dependencies.

4. mediapipe/tasks/c/BUILD

  • Removes GenAI C library dependencies from the C tasks binary: matches the Dockerfile’s decision to disable GenAI converter targets.

5. setup.py

  • Version is now read from version.bzl, removing the old "dev" hardcode.
  • The old behavior that appended task imports to __init__.py is removed.

6. metadata.py

  • Handles missing native metadata bindings (_pywrap_metadata_version) with a clear error when metadata export is attempted. This avoids hard crashes during import.

Updated the the Dockerfile to build python wheel
Updated the docker and shell file
@HarishPermal HarishPermal changed the title Harish dockerfile manylinux updated dockerfile manylinux Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant