I am not sure what, but some of this worked:
export GLIBCXX_USE_CXX11_ABI=0
export CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
export TORCH_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
#export DEBUG=1
export USE_GLOO=0
export REL_WITH_DEB_INFO=1
export USE_DISTRIBUTED=0

resulting in python -c “import torch; print(‘PYTORCH USING CXX11_ABI =’, torch._C._GLIBCXX_USE_CXX11_ABI )” → false