Docker container gives error when building wheel for h5py using python versions > 3.7.10

I found this old code that used python 3.7.10 and wanted to use a version greater than 3.7.10 since I need the latest versions of tensorflow and keras for compatibility issues with other scripts but I don’t know whats causing this error:

38.99 Building wheels for collected packages: h5py
38.99   Building wheel for h5py (pyproject.toml): started
39.24   Building wheel for h5py (pyproject.toml): finished with status 'error'
39.25   error: subprocess-exited-with-error
39.25   
39.25   × Building wheel for h5py (pyproject.toml) did not run successfully.
39.25   │ exit code: 1
39.25   ╰─> [75 lines of output]
39.25       running bdist_wheel
39.25       running build
39.25       running build_py
39.25       creating build
39.25       creating build/lib.linux-aarch64-cpython-38
39.25       creating build/lib.linux-aarch64-cpython-38/h5py
39.25       copying h5py/version.py -> build/lib.linux-aarch64-cpython-38/h5py
39.25       copying h5py/__init__.py -> build/lib.linux-aarch64-cpython-38/h5py
39.25       copying h5py/ipy_completer.py -> build/lib.linux-aarch64-cpython-38/h5py
39.25       copying h5py/h5py_warnings.py -> build/lib.linux-aarch64-cpython-38/h5py
39.25       creating build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/datatype.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/group.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/filters.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/compat.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/dataset.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/selections2.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/__init__.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/base.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/vds.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/selections.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/dims.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/files.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       copying h5py/_hl/attrs.py -> build/lib.linux-aarch64-cpython-38/h5py/_hl
39.25       creating build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/common.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_errors.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_ros3.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_file.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_attribute_create.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_objects.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dataset.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_slicing.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5f.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_completions.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5p.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_file_image.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_attrs_data.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/conftest.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_group.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_file2.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_attrs.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5pl.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_selections.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5o.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/__init__.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5z.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_file_alignment.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_datatype.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dtype.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_h5t.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_base.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_dimension_scales.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_filters.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       copying h5py/tests/test_big_endian_file.py -> build/lib.linux-aarch64-cpython-38/h5py/tests
39.25       creating build/lib.linux-aarch64-cpython-38/h5py/tests/data_files
39.25       copying h5py/tests/data_files/__init__.py -> build/lib.linux-aarch64-cpython-38/h5py/tests/data_files
39.25       creating build/lib.linux-aarch64-cpython-38/h5py/tests/test_vds
39.25       copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-aarch64-cpython-38/h5py/tests/test_vds
39.25       copying h5py/tests/test_vds/__init__.py -> build/lib.linux-aarch64-cpython-38/h5py/tests/test_vds
39.25       copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-aarch64-cpython-38/h5py/tests/test_vds
39.25       copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-aarch64-cpython-38/h5py/tests/test_vds
39.25       copying h5py/tests/data_files/vlen_string_dset.h5 -> build/lib.linux-aarch64-cpython-38/h5py/tests/data_files
39.25       copying h5py/tests/data_files/vlen_string_dset_utc.h5 -> build/lib.linux-aarch64-cpython-38/h5py/tests/data_files
39.25       copying h5py/tests/data_files/vlen_string_s390x.h5 -> build/lib.linux-aarch64-cpython-38/h5py/tests/data_files
39.25       running build_ext
39.25       Loading library to get build settings and version: libhdf5.so
39.25       error: Unable to load dependency HDF5, make sure HDF5 is installed properly
39.25       Library dirs checked: []
39.25       error: libhdf5.so: cannot open shared object file: No such file or directory
39.25       [end of output]
39.25   
39.25   note: This error originates from a subprocess, and is likely not a problem with pip.
39.25   ERROR: Failed building wheel for h5py
39.25 ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects
39.25 Failed to build h5py
39.25 
39.25 [notice] A new release of pip is available: 23.0.1 -> 24.0
39.25 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:9
--------------------
   7 |     
   8 |     # Install the requirements
   9 | >>> RUN pip install -r /requirements.txt
  10 |     
  11 |     # Copy over the scripts and the model_metrics
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r /requirements.txt" did not complete successfully: exit code: 1

this is the Dockerfile:

# Use python base image
#FROM continuumio/anaconda3
FROM python:3.8

# Copy over the requirements for the docker container
COPY requirements.txt /

# Install the requirements
RUN pip install -r /requirements.txt

# Copy over the scripts and the model_metrics
COPY ./model_metrics/ /model_metrics
COPY ./scripts/ /scripts


# Set the current working directory to scripts
WORKDIR ./scripts

this is the requirements.txt file:

tensorflow
numpy
scipy
pandas

I tried deleting all the other docker builds i had built in the past but it doesn’t work.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật