Make sure the command works in both centos and ubuntu. (#11894)

make one bash condition compatible with POSIX
This commit is contained in:
Yi Zhang 2022-06-18 03:19:22 +08:00 committed by GitHub
parent 1494120423
commit f70201c801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,8 @@ if [ "${AUDITWHEEL_POLICY}" = "musllinux_1_1" ]; then
apk add --no-cache bash
fi
if command -v yum &> /dev/null ; then
# https://www.shellcheck.net/wiki/SC3020
if command -v yum 2>&1 ; then
yum install -y yum-plugin-versionlock
yum versionlock cuda* libcudnn* libnccl*
fi