Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion circle-mlir/infra/docker/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARG VER_TORCH=2.7.0+cpu
ARG VER_ONNX=1.18.0
ARG VER_ONNXRUNTIME=1.21.1
ARG VER_NUMPY=1.26.4
ARG VER_H5PY=3.12.1

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

# Download experimental patch file for onnx-mlir

Expand Down
3 changes: 2 additions & 1 deletion circle-mlir/infra/docker/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ARG VER_TORCH=2.7.0+cpu
ARG VER_ONNX=1.18.0
ARG VER_ONNXRUNTIME=1.21.1
ARG VER_NUMPY=1.26.4
ARG VER_H5PY=3.12.1

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

# Download experimental patch file for onnx-mlir

Expand Down
3 changes: 2 additions & 1 deletion circle-mlir/infra/docker/noble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ARG VER_TORCH=2.7.0+cpu
ARG VER_ONNX=1.18.0
ARG VER_ONNXRUNTIME=1.21.1
ARG VER_NUMPY=1.26.4
ARG VER_H5PY=3.12.1

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

# Download experimental patch file for onnx-mlir

Expand Down
8 changes: 6 additions & 2 deletions circle-mlir/infra/overlay/prepare-venv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# use +e as python3.10 may not exist in the system and 'command' will return error.
set +e

PYTHON_CANDIDATES=("python3.12" "python3.10" "python3")
PYTHON_CANDIDATES=("python3.13" "python3.12" "python3.10" "python3")
for py in "${PYTHON_CANDIDATES[@]}"; do
PYTHON3_EXEC=$(command -v "$py")
if [[ -n "${PYTHON3_EXEC}" ]]; then
Expand Down Expand Up @@ -56,6 +56,7 @@ VER_TORCH=2.7.0+cpu
VER_ONNX=1.18.0
VER_ONNXRUNTIME=1.21.1
VER_NUMPY=1.26.4
VER_H5PY=3.12.1

PYTHON_VERSION=$($VENV_PYTHON -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
echo "python3 version is $PYTHON_VERSION"
Expand All @@ -66,6 +67,9 @@ if [[ "$PYTHON_VERSION" == "3.10" ]]; then
elif [[ "$PYTHON_VERSION" == "3.12" ]]; then
# Ubuntu 24.04 is python3.12
: # use as is
elif [[ "$PYTHON_VERSION" == "3.13" ]]; then
# Ubuntu 25.04 is python3.13
: # use as is
else
echo "Error prepare-venv: Unsupported python version: $PYTHON_VERSION"
exit 1
Expand All @@ -90,7 +94,7 @@ fi
PYTHON_PACKAGES="torch==${VER_TORCH} "
PYTHON_PACKAGES+="onnx==${VER_ONNX} "
PYTHON_PACKAGES+="onnxruntime==${VER_ONNXRUNTIME} "
PYTHON_PACKAGES+="h5py==3.8.0 "
PYTHON_PACKAGES+="h5py==${VER_H5PY} "
PYTHON_PACKAGES+="einops "
PYTHON_PACKAGES+="numpy==${VER_NUMPY} "

Expand Down
Loading