diff --git a/Dockerfile.manylinux2014_aarch64rp4 b/Dockerfile.manylinux2014_aarch64rp4 index b195b09263..fae02091a2 100644 --- a/Dockerfile.manylinux2014_aarch64rp4 +++ b/Dockerfile.manylinux2014_aarch64rp4 @@ -30,8 +30,10 @@ RUN chmod +x bazel RUN mv ./bazel /usr/local/bin # Copy Protobuf Compiler binary -ARG PROTOC_ZIP=protoc-5.28.3-linux-aarch_64.zip -RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v5.28.3/$PROTOC_ZIP +# Fix: Update to v28.3 to resolve 404 download error +ARG PROTOC_VERSION=28.3 +ARG PROTOC_ZIP=protoc-${PROTOC_VERSION}-linux-aarch_64.zip +RUN curl -fLo $PROTOC_ZIP https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/$PROTOC_ZIP RUN unzip -o $PROTOC_ZIP -d /usr/local bin/protoc RUN unzip -o $PROTOC_ZIP -d /usr/local 'include/*' RUN rm -f $PROTOC_ZIP @@ -96,13 +98,15 @@ RUN echo "build --client_env=CC=/usr/lib/llvm-18/bin/clang++" >> .bazelrc && \ sed -i "s|bazel_command.append('--define=OPENCV=source')|pass|g" setup.py # Apply diff to reduce the number of OpenCV dependencies. -RUN patch -p1 < mediapipe_python_build.diff +# Fix: Comment out missing patch file (Item 2) to prevent build failure +#RUN patch -p1 < mediapipe_python_build.diff ARG PYTHON_BIN="/opt/python/cp312-cp312/bin/python3.12" RUN ln -sf $PYTHON_BIN /usr/bin/python && \ ln -sf $PYTHON_BIN /usr/bin/python3 && \ - $PYTHON_BIN -m pip install wheel "numpy<2" auditwheel && \ - $PYTHON_BIN setup.py bdist_wheel clean --all -RUN auditwheel repair dist/*.whl - -RUN mkdir /wheelhouse/ && cp dist/* /wheelhouse/ + $PYTHON_BIN -m pip install wheel "numpy<2" auditwheel setuptools && \ + # Fix: Disable GenAI ODML converter to avoid build errors (Item 4) + sed -i '/genai\/converter/d' mediapipe/tasks/c/BUILD && \ + sed -i "s/ENABLE_ODML_CONVERTER=1/ENABLE_ODML_CONVERTER=0/g" setup.py && \ + rm -rf mediapipe/tasks/c/genai && \ + $PYTHON_BIN setup.py bdist_wheel clean --all \ No newline at end of file