mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-13 12:44:37 +08:00
This is needed because manylinux uses GCC-13 since #152825 As a result of the current compiler version mismatches, we've seen tests passing jammy-aarch64 pre-commit CI, but failing for wheels built in manylinux Related to: #166736 Pull Request resolved: https://github.com/pytorch/pytorch/pull/166849 Approved by: https://github.com/robert-hardwick, https://github.com/malfet, https://github.com/Skylion007, https://github.com/atalman
21 lines
699 B
Bash
21 lines
699 B
Bash
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
if [ -n "$GCC_VERSION" ]; then
|
|
|
|
# Need the official toolchain repo to get alternate packages
|
|
add-apt-repository ppa:ubuntu-toolchain-r/test
|
|
apt-get update
|
|
apt-get install -y g++-$GCC_VERSION gfortran-$GCC_VERSION
|
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-"$GCC_VERSION" 50
|
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-"$GCC_VERSION" 50
|
|
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-"$GCC_VERSION" 50
|
|
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-"$GCC_VERSION" 50
|
|
|
|
# Cleanup package manager
|
|
apt-get autoclean && apt-get clean
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
fi
|