Closed timpraferi closed 1 year ago
Did you comment out the build script, login in the docker container and check the cmake version.
Thank you @mszhanyi I checked and my script didn't actually upgrade the cmake version
Step 7/7 : RUN cmake --version
---> Running in 3f122a59c2a9
cmake version 3.22.1
Had to add
ENV PATH="/opt/cmake-3.24.1/bin/:${PATH}"
Now it's the right version
Step 7/7 : RUN cmake --version
---> Running in 0053f3495781
cmake version 3.24.1
Now I'm waiting to se if it builds
Ok, the final version is
# --------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------
# Dockerfile to run ONNXRuntime with ROCm integration
#--------------------------------------------------------------------------
FROM rocm/pytorch:rocm5.2.3_ubuntu20.04_py3.7_pytorch_1.12.1
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG ONNXRUNTIME_BRANCH=main
WORKDIR /code
RUN apt-get update \
&& apt-get -y install build-essential \
&& apt-get install -y wget \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /opt/cmake-3.24.1 \
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.24.1 \
&& rm /tmp/cmake-install.sh \
&& ln -s /opt/cmake-3.24.1/bin/* /usr/local/bin
ENV PATH="/opt/cmake-3.24.1/bin/:${PATH}"
#RUN cmake --version
# Prepare onnxruntime repository & build onnxruntime
RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
cd onnxruntime &&\
/bin/sh ./build.sh --config Release --build_wheel --update --build --parallel --cmake_extra_defines\
ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) --use_rocm --rocm_home=/opt/rocm &&\
pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\
cd ..
Does anybody else have this problem? If so this might me worth a pull request.
Describe the issue
I'm trying to build the ROCm docker image and its failing.
Seams to be a CMake minimum version error. Tried adding this line to the Dockerfile and it didn't work.
Urgency
No response
Target platform
Linux, Python, x86_64, ROCm (Preview) Linux 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build script
Error / output
Visual Studio Version
No response
GCC / Compiler Version
No response