19
19
description : " Pre script to run prior to build"
20
20
default : " "
21
21
type : string
22
+ env-var-script :
23
+ description : " Script that sets Domain-Specific Environment Variables"
24
+ default : " "
25
+ type : string
22
26
test-infra-repository :
23
27
description : " Test infra repository to use"
24
28
default : " pytorch/test-infra"
77
81
container :
78
82
image : ${{ matrix.container_image }}
79
83
options : ${{ matrix.gpu_arch_type == 'cuda' && '--gpus all' || ' ' }}
80
- # TO DO: ask Naren, I am not able to skip the release build if it is not cuda12.1 on the job level
81
- # if: ${{ env.CU_VERSION == '12.1' }}
82
-
83
84
# If a build is taking longer than 60 minutes on these runners we need
84
85
# to have a conversation
85
86
timeout-minutes : 60
@@ -116,6 +117,19 @@ jobs:
116
117
python-version : ${{ env.PYTHON_VERSION }}
117
118
cuda-version : ${{ env.CU_VERSION }}
118
119
arch : ${{ env.ARCH }}
120
+ - name : Combine Env Var and Build Env Files
121
+ if : ${{ inputs.env-var-script != '' }}
122
+ working-directory : ${{ inputs.repository }}
123
+ run : |
124
+ set -euxo pipefail
125
+ cat "${{ inputs.env-var-script }}" >> "${BUILD_ENV_FILE}"
126
+ - name : Install torch dependency
127
+ run : |
128
+ set -euxo pipefail
129
+ # shellcheck disable=SC1090
130
+ source "${BUILD_ENV_FILE}"
131
+ # shellcheck disable=SC2086
132
+ ${CONDA_RUN} ${PIP_INSTALL_TORCH}
119
133
- name : Run Pre-Script with Caching
120
134
if : ${{ inputs.pre-script != '' }}
121
135
uses : ./test-infra/.github/actions/run-script-with-cache
@@ -129,12 +143,12 @@ jobs:
129
143
with :
130
144
name : ${{ env.ARTIFACT_NAME }}
131
145
path : /opt/torch-tensorrt-builds/
132
- - name : Install torch and torch-tensorrt
133
- if : ${{ inputs.pre-script != '' }}
134
- uses : ./test-infra/.github/actions/run-script-with-cache
135
- with :
136
- repository : ${{ inputs.repository }}
137
- script : .github/scripts/install-torch-tensorrt.sh
146
+ # - name: Install torch and torch-tensorrt
147
+ # if: ${{ inputs.pre-script != '' }}
148
+ # uses: ./test-infra/.github/actions/run-script-with-cache
149
+ # with:
150
+ # repository: ${{ inputs.repository }}
151
+ # script: .github/scripts/install-torch-tensorrt.sh
138
152
- name : Pack script
139
153
continue-on-error : ${{ inputs.continue-on-error }}
140
154
working-directory : ${{ inputs.repository }}
0 commit comments