File tree Expand file tree Collapse file tree 3 files changed +62
-8
lines changed Expand file tree Collapse file tree 3 files changed +62
-8
lines changed Original file line number Diff line number Diff line change @@ -180,14 +180,32 @@ jobs:
180
180
CONSTRAINTS="cpuonly"
181
181
fi
182
182
183
+ # From Conda documentation:
184
+ # https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
185
+ # From the command line use --c
186
+ # You may specify multiple channels by passing the argument multiple times.
187
+ # Priority decreases from left to right - the first argument is higher priority than the second.
188
+ # From the command line use --override-channels to only search the specified channel(s),
189
+ # rather than any channels configured in .condarc.
190
+
183
191
${CONDA_RUN_SMOKE} conda install \
184
192
--yes \
185
193
--quiet \
194
+ -c "${CONDA_LOCAL_CHANNEL}" \
186
195
-c pytorch-"${CHANNEL}" \
187
196
-c nvidia \
188
- -c "${CONDA_LOCAL_CHANNEL}" \
189
- distr::"${PACKAGE_NAME}" \
190
- ${CONSTRAINTS}
197
+ -c defaults \
198
+ "${PACKAGE_NAME}" \
199
+ ${CONSTRAINTS} \
200
+ --override-channels
201
+
202
+ # check for installed package channel
203
+ CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
204
+ if [[ -z "${CONDA_PKG}" ]]; then
205
+ ${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
206
+ echo "${PACKAGE_NAME} is not installed from local channel"
207
+ exit 1
208
+ fi
191
209
192
210
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
193
211
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Original file line number Diff line number Diff line change @@ -182,14 +182,32 @@ jobs:
182
182
export CONDA_RUN_SMOKE="conda run -p ${CONDA_ENV_SMOKE}"
183
183
export OLD_PATH=${PATH}
184
184
export PATH="${CONDA_ENV_SMOKE}/bin:${PATH}"
185
-
186
185
CONDA_LOCAL_CHANNEL="file://$(readlink -f ${{ inputs.repository }}/distr)"
186
+
187
+ # From Conda documentation:
188
+ # https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
189
+ # From the command line use --c
190
+ # You may specify multiple channels by passing the argument multiple times.
191
+ # Priority decreases from left to right - the first argument is higher priority than the second.
192
+ # From the command line use --override-channels to only search the specified channel(s),
193
+ # rather than any channels configured in .condarc.
194
+
187
195
${CONDA_RUN_SMOKE} conda install \
188
196
--quiet \
189
197
--yes \
190
198
-c "${CONDA_LOCAL_CHANNEL}" \
191
199
-c pytorch-${CHANNEL} \
192
- "${PACKAGE_NAME}"
200
+ -c defaults \
201
+ "${PACKAGE_NAME}" \
202
+ "--override-channels"
203
+
204
+ # check for installed package channel
205
+ CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
206
+ if [[ -z "${CONDA_PKG}" ]]; then
207
+ ${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
208
+ echo "${PACKAGE_NAME} is not installed from local channel"
209
+ exit 1
210
+ fi
193
211
194
212
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
195
213
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Original file line number Diff line number Diff line change @@ -200,14 +200,32 @@ jobs:
200
200
CONSTRAINTS="cpuonly"
201
201
fi
202
202
203
+ # From Conda documentation:
204
+ # https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
205
+ # From the command line use --c
206
+ # You may specify multiple channels by passing the argument multiple times.
207
+ # Priority decreases from left to right - the first argument is higher priority than the second.
208
+ # From the command line use --override-channels to only search the specified channel(s),
209
+ # rather than any channels configured in .condarc.
210
+
203
211
${CONDA_RUN_SMOKE} conda install \
204
212
--quiet \
205
213
--yes \
214
+ -c "${CONDA_LOCAL_CHANNEL}" \
206
215
-c pytorch-"${CHANNEL}" \
207
216
-c nvidia \
208
- -c "${CONDA_LOCAL_CHANNEL}" \
209
- distr::"${PACKAGE_NAME}" \
210
- ${CONSTRAINTS}
217
+ -c defaults \
218
+ "${PACKAGE_NAME}" \
219
+ ${CONSTRAINTS} \
220
+ --override-channels
221
+
222
+ # check for installed package channel
223
+ CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
224
+ if [[ -z "${CONDA_PKG}" ]]; then
225
+ ${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
226
+ echo "${PACKAGE_NAME} is not installed from local channel"
227
+ exit 1
228
+ fi
211
229
212
230
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
213
231
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
You can’t perform that action at this time.
0 commit comments