From be6d690e3f9676238b5cf18c0a6dfb2cab0ae4b7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 10 Apr 2024 20:16:17 +0200 Subject: [PATCH] Fix `h5py` wheel builds on ARM64 Dockerfiles (#9956) Signed-off-by: Glenn Jocher --- docker/Dockerfile-arm64 | 3 ++- docker/Dockerfile-jetson | 4 +++- pyproject.toml | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index e9ab84c0ca..7be33ab54e 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -13,7 +13,8 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ # Install linux packages # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package -# cmake and build-essential is needed to build onnxsim when exporting to tflite +# cmake and build-essential are needed to build 'onnxsim' when exporting to TFLite +# pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' RUN apt update \ && apt install --no-install-recommends -y python3-pip git zip curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 build-essential diff --git a/docker/Dockerfile-jetson b/docker/Dockerfile-jetson index 04dc64f32d..ffac4c3adb 100644 --- a/docker/Dockerfile-jetson +++ b/docker/Dockerfile-jetson @@ -11,7 +11,9 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \ /root/.config/Ultralytics/ # Install linux packages -# g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package +# g++ required to build 'tflite_support' and 'lap' packages +# libusb-1.0-0 required for 'tflite_support' package when exporting to TFLite +# pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow' RUN apt update \ && apt install --no-install-recommends -y gcc git zip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 diff --git a/pyproject.toml b/pyproject.toml index fa723d9b74..f3a60e9281 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,8 @@ export = [ "openvino>=2024.0.0", # OpenVINO export "tensorflow<=2.13.1; python_version <= '3.11'", # TF bug https://github.com/ultralytics/ultralytics/issues/5161 "tensorflowjs>=3.9.0; python_version <= '3.11'", # TF.js export, automatically installs tensorflow - "numpy==1.23.5; platform_machine == 'aarch64'", # Fix error: `np.bool` was a deprecated alias for the builtin `bool` when using TensorRT models on NVIDIA Jetson + "numpy==1.23.5; platform_machine == 'aarch64'", # fix error: `np.bool` was a deprecated alias for the builtin `bool` when using TensorRT models on NVIDIA Jetson + "h5py!=3.11.0; platform_machine == 'aarch64'", # fix h5py build issues due to missing aarch64 wheels in 3.11 release ] explorer = [ "lancedb", # vector search