Skip to content

Commit 03757ac

Browse files
committed
fix nuget pipeline
1 parent b58076e commit 03757ac

File tree

4 files changed

+55
-7
lines changed

4 files changed

+55
-7
lines changed

tools/ci_build/github/azure-pipelines/cuda-packaging-pipeline.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ variables:
5858
- name: ReleaseVersionSuffix
5959
value: ''
6060
- name: win_trt_home
61-
${{ if eq(parameters.CudaVersion, '13.0') }}:
62-
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda13 }}
6361
${{ if eq(parameters.CudaVersion, '12.8') }}:
6462
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda12 }}
65-
- name: win_cuda_home
6663
${{ if eq(parameters.CudaVersion, '13.0') }}:
67-
value: $(Agent.TempDirectory)\v13.0
64+
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda13 }}
65+
- name: win_cuda_home
6866
${{ if eq(parameters.CudaVersion, '12.8') }}:
6967
value: $(Agent.TempDirectory)\v12.8
68+
${{ if eq(parameters.CudaVersion, '13.0') }}:
69+
value: $(Agent.TempDirectory)\v13.0
7070
# CMAKE_CUDA_ARCHITECTURES for Windows nuget packaging
7171
- name: CudaArchs
7272
${{ if eq(parameters.CudaVersion, '12.8') }}:

tools/ci_build/github/azure-pipelines/custom-nuget-packaging-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extends:
107107
msbuildPlatform: x64
108108
packageName: x64-cuda
109109
CudaVersion: ${{ parameters.CudaVersion }}
110-
buildparameter: --use_cuda --cuda_home=${{ variables.win_cuda_home }} --enable_onnx_tests --use_webgpu --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ variables.CmakeCudaArchitectures }}"
110+
buildparameter: --use_cuda --cuda_home=${{ variables.win_cuda_home }} --enable_onnx_tests --use_webgpu --parallel 4 --nvcc_threads 1 --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ variables.CmakeCudaArchitectures }}"
111111
runTests: false
112112
buildJava: false
113113
java_artifact_id: onnxruntime_gpu

tools/ci_build/github/azure-pipelines/stages/nuget-win-cuda-packaging-stage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ stages:
6666
msbuildPlatform: x64
6767
packageName: x64-cuda
6868
CudaVersion: ${{ parameters.CudaVersion }}
69-
buildparameter: --use_cuda --cuda_home=${{ parameters.win_cuda_home }} --enable_onnx_tests --enable_wcos --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ parameters.CudaArchs }}"
69+
buildparameter: --use_cuda --cuda_home=${{ parameters.win_cuda_home }} --enable_onnx_tests --enable_wcos --parallel 4 --nvcc_threads 1 --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ parameters.CudaArchs }}"
7070
runTests: ${{ parameters.RunOnnxRuntimeTests }}
7171
buildJava: ${{ parameters.buildJava }}
7272
java_artifact_id: onnxruntime_gpu
@@ -86,7 +86,7 @@ stages:
8686
msbuildPlatform: x64
8787
CudaVersion: ${{ parameters.CudaVersion }}
8888
packageName: x64-tensorrt
89-
buildparameter: --use_tensorrt --tensorrt_home=${{ parameters.win_trt_home }} --cuda_home=${{ parameters.win_cuda_home }} --enable_onnx_tests --enable_wcos --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ parameters.CudaArchs }}"
89+
buildparameter: --use_tensorrt --tensorrt_home=${{ parameters.win_trt_home }} --cuda_home=${{ parameters.win_cuda_home }} --enable_onnx_tests --enable_wcos --parallel 4 --nvcc_threads 1 --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=${{ parameters.CudaArchs }}"
9090
runTests: ${{ parameters.RunOnnxRuntimeTests }}
9191
buildJava: ${{ parameters.buildJava }}
9292
java_artifact_id: onnxruntime_gpu
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
# This file is used by Zip-Nuget Packaging NoContribOps Pipeline,Zip-Nuget-Java Packaging Pipeline
5+
ARG BASEIMAGE=onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda13_x64_almalinux8_gcc14_dotnet:20251107.1
6+
FROM $BASEIMAGE
7+
ARG TRT_VERSION
8+
9+
#Install TensorRT only if TRT_VERSION is not empty
10+
RUN if [ -n "$TRT_VERSION" ]; then \
11+
echo "TRT_VERSION is $TRT_VERSION" && \
12+
dnf -y install \
13+
libnvinfer10-${TRT_VERSION} \
14+
libnvinfer-headers-devel-${TRT_VERSION} \
15+
libnvinfer-devel-${TRT_VERSION} \
16+
libnvinfer-lean10-${TRT_VERSION} \
17+
libnvonnxparsers10-${TRT_VERSION} \
18+
libnvonnxparsers-devel-${TRT_VERSION} \
19+
libnvinfer-dispatch10-${TRT_VERSION} \
20+
libnvinfer-plugin10-${TRT_VERSION} \
21+
libnvinfer-vc-plugin10-${TRT_VERSION} \
22+
libnvinfer-bin-${TRT_VERSION} \
23+
libnvinfer-plugin10-${TRT_VERSION} \
24+
libnvinfer-plugin-devel-${TRT_VERSION} \
25+
libnvinfer-vc-plugin-devel-${TRT_VERSION} \
26+
libnvinfer-lean-devel-${TRT_VERSION} \
27+
libnvinfer-dispatch-devel-${TRT_VERSION} \
28+
libnvinfer-headers-plugin-devel-${TRT_VERSION} && \
29+
dnf clean dbcache ; \
30+
else \
31+
echo "TRT_VERSION is none skipping Tensor RT Installation" ; \
32+
fi
33+
34+
35+
36+
ENV LANG=en_US.UTF-8
37+
ENV LC_ALL=en_US.UTF-8
38+
39+
ENV CUDAHOSTCXX=/opt/rh/gcc-toolset-14/root/usr/bin/g++
40+
ADD scripts /tmp/scripts
41+
RUN sed -i 's/enabled\s*=\s*1/enabled = 1\nexclude=dotnet* aspnet* netstandard*/g' /etc/yum.repos.d/almalinux.repo
42+
ENV PATH=/usr/lib/jvm/msopenjdk-17/bin:$PATH
43+
ENV JAVA_HOME=/usr/lib/jvm/msopenjdk-17
44+
ARG BUILD_UID=1001
45+
ARG BUILD_USER=onnxruntimedev
46+
RUN adduser --uid $BUILD_UID $BUILD_USER
47+
WORKDIR /home/$BUILD_USER
48+
USER $BUILD_USER

0 commit comments

Comments
 (0)