diff --git a/t/torchvision/torchvision_0.29.0_ubi_10.2.sh b/t/torchvision/torchvision_0.29.0_ubi_10.2.sh index 390b9be973..26c9d57c8e 100644 --- a/t/torchvision/torchvision_0.29.0_ubi_10.2.sh +++ b/t/torchvision/torchvision_0.29.0_ubi_10.2.sh @@ -46,7 +46,7 @@ yum install -y python3.14 python3.14-devel python3.14-pip \ pkg-config \ libjpeg-turbo-devel libpng-devel libwebp-devel \ zlib-devel openssl-devel libffi-devel \ - which curl tar + which curl wget tar # UBI 10 dropped SCL — guard block if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then @@ -102,6 +102,12 @@ if ! git rev-parse "${_TAG}" &>/dev/null; then fi git checkout "${_TAG}" +# --------------------------------------------------------------------------- +# Apply patch to exclude SWAG models (CC-BY-NC-4.0 license) +# --------------------------------------------------------------------------- +wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/t/torchvision/0001-Exclude-source-that-has-commercial-license_v0.29.0.patch +git apply --ignore-whitespace 0001-Exclude-source-that-has-commercial-license_v0.29.0.patch + # --------------------------------------------------------------------------- # Apply patches for PyTorch 2.13.0 Stable ABI compatibility: https://github.com/pytorch/vision/pull/9610 # --------------------------------------------------------------------------- @@ -147,7 +153,8 @@ PYEOF # --------------------------------------------------------------------------- export FORCE_CUDA=0 export TORCHVISION_USE_NVJPEG=0 -# Pin the version string so the wheel name is torchvision-0.29.0-* instead of torchvision-0.29.0a0+-* +# Pin the version string so the wheel name is torchvision-0.29.0-* instead +# of torchvision-0.29.0a0+-* export BUILD_VERSION="${PACKAGE_VERSION#v}" export PYTORCH_VERSION="${TORCH_VERSION}"