Adding new yaml file for downloading cuda, and trt from azure blob (#18443)

This also set the Path variable for the downloaded libraries. 

### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
Jian Chen 2023-11-14 19:47:39 -08:00 committed by GitHub
parent f9af94009b
commit 05526b354b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,51 @@
parameters:
- name: DownloadCUDA
type: boolean
default: false
- name: DownloadTRT
type: boolean
default: false
- name: CudaVersion
type: string
default: '11.8'
values:
- 11.8
- 12.2
steps:
- ${{ if eq(parameters.DownloadCUDA, true) }}:
- powershell: |
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ parameters.CudaVersion }} $(Agent.TempDirectory)
displayName: 'Download CUDA SDK v${{ parameters.CudaVersion }}'
- powershell: |
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\v${{ parameters.CudaVersion }}\bin;$(Agent.TempDirectory)\v${{ parameters.CudaVersion }}\extras\CUPTI\lib64"
displayName: 'Append CUDA SDK Directory to PATH'
- task: CmdLine@2
inputs:
script: |
echo %PATH%
displayName: 'Print PATH'
- ${{ if eq(parameters.DownloadTRT, true) }}:
- ${{ if eq(parameters.CudaVersion, '11.8') }}:
- powershell: |
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/local/TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8 $(Agent.TempDirectory)
displayName: 'Download TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8'
- powershell: |
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8\lib"
displayName: 'Append CUDA SDK Directory to PATH'
- ${{ if eq(parameters.CudaVersion, '12.2') }}:
- powershell: |
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/local/TensorRT-8.6.1.6.Windows10.x86_64.cuda-12.0 $(Agent.TempDirectory)
displayName: 'Download TensorRT-8.6.1.6.Windows10.x86_64.cuda-12.0'
- powershell: |
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\TensorRT-8.6.1.6.Windows10.x86_64.cuda-12.0\lib"
displayName: 'Append CUDA SDK Directory to PATH'
- task: CmdLine@2
inputs:
script: |
echo %PATH%
displayName: 'Print PATH'