@@ -19,14 +19,15 @@ RUN apt-get update \
1919RUN apt-get update \
2020 && apt-get -qqy install python3 python3-pip python3-venv python3-dev python3-all dh-python
2121RUN python3 -m pip install --upgrade pip setuptools
22- RUN python3 -m pip install yapf==0.43.0 numpy==2.2.4 h5py==3.8.0 einops
22+ RUN python3 -m pip install yapf==0.43.0 h5py==3.8.0 einops
2323
2424# TODO upgrade
25- ARG VER_TORCH=2.6.0
25+ ARG VER_TORCH=2.6.0+cpu
2626ARG VER_ONNX=1.17.0
2727ARG VER_ONNXRUNTIME=1.21.0
2828
29- RUN python3 -m pip install torch==${VER_TORCH} onnx==${VER_ONNX} onnxruntime==${VER_ONNXRUNTIME}
29+ RUN python3 -m pip install numpy==1.24.3 torch==${VER_TORCH} -f https://download.pytorch.org/whl/torch
30+ RUN python3 -m pip install onnx==${VER_ONNX} onnxruntime==${VER_ONNXRUNTIME}
3031
3132# Clean archives (to reduce image size)
3233RUN apt-get clean -y
@@ -122,6 +123,10 @@ RUN mkdir llvm-project-build && cd llvm-project-build \
122123
123124RUN cd llvm-project-build && cmake --build . && cmake --install .
124125
126+ # LLVM/MLIR clean up
127+ RUN rm -rf llvm-project
128+ RUN rm -rf llvm-project-build
129+
125130# ONNX-MLIR build from source
126131# Patch to accept INT16 for QuantizeLinear/DequantizeLinear and fix ONNX passes
127132RUN cd onnx-mlir \
@@ -133,15 +138,12 @@ RUN mkdir onnx-mlir-build && cd onnx-mlir-build \
133138 -DPython3_ROOT_DIR=/usr/bin \
134139 -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link \
135140 -DCMAKE_JOB_POOLS:STRING='compile=4;link=1' \
136- -DONNX_MLIR_BUILD_TESTS=OFF -DONNX_MLIR_ENABLE_MHLO=OFF -DLLVM_ENABLE_ASSERTIONS=ON \
141+ -DONNX_MLIR_BUILD_TESTS=OFF -DONNX_MLIR_ENABLE_STABLEHLO=OFF \
142+ -DONNX_MLIR_ENABLE_JAVA=OFF -DLLVM_ENABLE_ASSERTIONS=ON \
137143 ../onnx-mlir
138144
139145RUN cd onnx-mlir-build && cmake --build . && cmake --install .
140146
141- # LLVM/MLIR clean up
142- RUN rm -rf llvm-project
143- RUN rm -rf llvm-project-build
144-
145147# ONNX-MLIR clean up
146148RUN rm -rf onnx-mlir/.git \
147149 && rm -rf onnx-mlir/third_party/* \
0 commit comments