Skip to content

Commit

Permalink
chage: build onnxruntime 1.18.0 for cuda 12
Browse files Browse the repository at this point in the history
  • Loading branch information
minostauros committed May 30, 2024
1 parent b6ce9ec commit cf30e38
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,26 +126,26 @@ RUN echo "Asia/Seoul" > /etc/timezone && \
libnvinfer-vc-plugin-dev=${TENSORRT_VERSION} libnvinfer-vc-plugin8=${TENSORRT_VERSION} \
tensorrt=${TENSORRT_VERSION} && \
pip${PYTHON_VERSION} install ${PIP_TENSORRT} && \
pip${PYTHON_VERSION} install onnxruntime-gpu==${ONNXRUNTIME_VERSION} --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \
# DIR=/tmp/onnxruntime && \
# mkdir -p ${DIR} && \
# cd ${DIR} && \
# # git clone --recursive --branch v${ONNXRUNTIME_VERSION} https://github.com/Microsoft/onnxruntime . && \
# pip${PYTHON_VERSION} install onnxruntime-gpu==${ONNXRUNTIME_VERSION} --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ && \
DIR=/tmp/onnxruntime && \
mkdir -p ${DIR} && \
cd ${DIR} && \
git clone --recursive --branch v${ONNXRUNTIME_VERSION} https://github.com/Microsoft/onnxruntime . && \
# git clone --recursive https://github.com/Microsoft/onnxruntime . && \
# export CUDACXX=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc && \
# git config --add safe.directory ${DIR} && \
# bash build.sh --config Release --build_shared_lib \
# --use_cuda --cuda_version "${CUDA_VERSION}" \
# --cuda_home /usr/local/cuda-${CUDA_VERSION} \
# --cudnn_home /usr/include/ \
# --build_wheel --skip_tests \
# --use_tensorrt --tensorrt_home /usr/src/tensorrt/ \
# --cmake_extra_defines "onnxruntime_BUILD_UNIT_TESTS=OFF" \
# --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}" \
# --allow_running_as_root && \
# pip${PYTHON_VERSION} install build/Linux/Release/dist/onnxruntime_gpu-*.whl && \
# rm -rf ${DIR} && \
# cd /tmp/ && \
export CUDACXX=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc && \
git config --add safe.directory ${DIR} && \
bash build.sh --config Release --build_shared_lib \
--use_cuda --cuda_version "${CUDA_VERSION}" \
--cuda_home /usr/local/cuda-${CUDA_VERSION} \
--cudnn_home /usr/include/ \
--build_wheel --skip_tests \
--use_tensorrt --tensorrt_home /usr/src/tensorrt/ \
--cmake_extra_defines "onnxruntime_BUILD_UNIT_TESTS=OFF" \
--cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}" \
--allow_running_as_root && \
pip${PYTHON_VERSION} install build/Linux/Release/dist/onnxruntime_gpu-*.whl && \
rm -rf ${DIR} && \
cd /tmp/ && \
# remove futile apt packages and pip cache
apt-get -y remove \
libncurses5-dev \
Expand Down

0 comments on commit cf30e38

Please sign in to comment.