File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,25 @@ install_pip_dependencies() {
5454  popd 
5555}
5656
57+ fix_conda_ubuntu_libstdcxx () {
58+   cat /etc/issue
59+   #  WARNING: This is a HACK from PyTorch core to be able to build PyTorch on 22.04.
60+   #  Specifically, ubuntu-20+ all comes lib libstdc++ newer than 3.30+, but anaconda
61+   #  is stuck with 3.29. So, remove libstdc++6.so.3.29 as installed by
62+   #  https://anaconda.org/anaconda/libstdcxx-ng/files?version=11.2.0
63+   # 
64+   #  PyTorch sev: https://github.com/pytorch/pytorch/issues/105248
65+   #  Ref: https://github.com/pytorch/pytorch/blob/main/.ci/docker/common/install_conda.sh
66+   if  grep -e " 2[02].04." > /dev/null;  then 
67+     rm /opt/conda/envs/py_${PYTHON_VERSION} /lib/libstdc++.so* 
68+   fi 
69+ }
70+ 
5771install_miniconda
5872install_python
5973install_pip_dependencies
74+ #  Hack breaks the job on aarch64 but is still necessary everywhere
75+ #  else.
76+ if  [ " $( uname -m) " !=  " aarch64" ;  then 
77+     fix_conda_ubuntu_libstdcxx
78+ fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments