Skip to content

Commit 58608a7

Browse files
committed
[circle-mlir/infra] Bump h5py to 3.12.1 for Python 3.13 support
This commit bumps h5py package to version 3.12.1. This is the first version which supports Python 3.13. Changes has been tested with upgraded ONNX-MLIR and LLVM in order to compile with GCC 15.2.0 which is the default compiler on Ubuntu 25.04. Used tags for these projects: GIT_TAG_ONNXMLIR: 8524104871c9a5c23973753e0f99ea8b42e3c943 GIT_TAG_LLVMPROJ: 0c2701fe7fa002e1befc5f86c268a7964f96d286 ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy <a.bokowy@samsung.com>
1 parent e58f9ba commit 58608a7

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

circle-mlir/infra/docker/focal/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ ARG VER_TORCH=2.7.0+cpu
3232
ARG VER_ONNX=1.18.0
3333
ARG VER_ONNXRUNTIME=1.21.1
3434
ARG VER_NUMPY=1.26.4
35+
ARG VER_H5PY=3.12.1
3536

3637
# Clean archives (to reduce image size)
3738
RUN apt-get clean -y
@@ -60,7 +61,7 @@ RUN ${WORK_DIR}/venv/bin/python3 -m pip install --upgrade pip setuptools
6061
RUN ${WORK_DIR}/venv/bin/python3 -m pip install numpy==${VER_NUMPY} torch==${VER_TORCH} \
6162
-f https://download.pytorch.org/whl/torch
6263
RUN ${WORK_DIR}/venv/bin/python3 -m pip install onnx==${VER_ONNX} onnxruntime==${VER_ONNXRUNTIME} \
63-
h5py==3.8.0 einops
64+
h5py==${VER_H5PY} einops
6465

6566
# Download experimental patch file for onnx-mlir
6667

circle-mlir/infra/docker/jammy/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ARG VER_TORCH=2.7.0+cpu
2929
ARG VER_ONNX=1.18.0
3030
ARG VER_ONNXRUNTIME=1.21.1
3131
ARG VER_NUMPY=1.26.4
32+
ARG VER_H5PY=3.12.1
3233

3334
# Clean archives (to reduce image size)
3435
RUN apt-get clean -y
@@ -52,7 +53,7 @@ RUN ${WORK_DIR}/venv/bin/python3 -m pip install --upgrade pip setuptools
5253
RUN ${WORK_DIR}/venv/bin/python3 -m pip install numpy==${VER_NUMPY} torch==${VER_TORCH} \
5354
-f https://download.pytorch.org/whl/torch
5455
RUN ${WORK_DIR}/venv/bin/python3 -m pip install onnx==${VER_ONNX} onnxruntime==${VER_ONNXRUNTIME} \
55-
h5py==3.8.0 einops
56+
h5py==${VER_H5PY} einops
5657

5758
# Download experimental patch file for onnx-mlir
5859

circle-mlir/infra/docker/noble/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ARG VER_TORCH=2.7.0+cpu
2929
ARG VER_ONNX=1.18.0
3030
ARG VER_ONNXRUNTIME=1.21.1
3131
ARG VER_NUMPY=1.26.4
32+
ARG VER_H5PY=3.12.1
3233

3334
# Clean archives (to reduce image size)
3435
RUN apt-get clean -y
@@ -52,7 +53,7 @@ RUN ${WORK_DIR}/venv/bin/python3 -m pip install --upgrade pip setuptools
5253
RUN ${WORK_DIR}/venv/bin/python3 -m pip install numpy==${VER_NUMPY} torch==${VER_TORCH} \
5354
-f https://download.pytorch.org/whl/torch
5455
RUN ${WORK_DIR}/venv/bin/python3 -m pip install onnx==${VER_ONNX} onnxruntime==${VER_ONNXRUNTIME} \
55-
h5py==3.8.0 einops
56+
h5py==${VER_H5PY} einops
5657

5758
# Download experimental patch file for onnx-mlir
5859

circle-mlir/infra/overlay/prepare-venv

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# use +e as python3.10 may not exist in the system and 'command' will return error.
2121
set +e
2222

23-
PYTHON_CANDIDATES=("python3.12" "python3.10" "python3")
23+
PYTHON_CANDIDATES=("python3.13" "python3.12" "python3.10" "python3")
2424
for py in "${PYTHON_CANDIDATES[@]}"; do
2525
PYTHON3_EXEC=$(command -v "$py")
2626
if [[ -n "${PYTHON3_EXEC}" ]]; then
@@ -56,6 +56,7 @@ VER_TORCH=2.7.0+cpu
5656
VER_ONNX=1.18.0
5757
VER_ONNXRUNTIME=1.21.1
5858
VER_NUMPY=1.26.4
59+
VER_H5PY=3.12.1
5960

6061
PYTHON_VERSION=$($VENV_PYTHON -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
6162
echo "python3 version is $PYTHON_VERSION"
@@ -66,6 +67,9 @@ if [[ "$PYTHON_VERSION" == "3.10" ]]; then
6667
elif [[ "$PYTHON_VERSION" == "3.12" ]]; then
6768
# Ubuntu 24.04 is python3.12
6869
: # use as is
70+
elif [[ "$PYTHON_VERSION" == "3.13" ]]; then
71+
# Ubuntu 25.04 is python3.13
72+
: # use as is
6973
else
7074
echo "Error prepare-venv: Unsupported python version: $PYTHON_VERSION"
7175
exit 1
@@ -90,7 +94,7 @@ fi
9094
PYTHON_PACKAGES="torch==${VER_TORCH} "
9195
PYTHON_PACKAGES+="onnx==${VER_ONNX} "
9296
PYTHON_PACKAGES+="onnxruntime==${VER_ONNXRUNTIME} "
93-
PYTHON_PACKAGES+="h5py==3.8.0 "
97+
PYTHON_PACKAGES+="h5py==${VER_H5PY} "
9498
PYTHON_PACKAGES+="einops "
9599
PYTHON_PACKAGES+="numpy==${VER_NUMPY} "
96100

0 commit comments

Comments
 (0)