The problem during the build that caused incompatibility issues turned out to be CMAKE_PREFIX_PATH, which instructs CMake to look in that directory during compilation.
This is why the packages in /opt/conda/lib were interfering with the compile, even though only /opt/conda/bin was included.
Put /opt/conda/bin to the front of the PATH to ensure that the latest packages are used instead of system packages.
Remove or comment out CMAKE_PREFIX_PATH in PyTorch build since it appears to be the cause of many problems.
The issue seems to be with adding /etc/ld.so.conf.d to the linking later on instead of the PATH variable. Removing CMAKE_PREFIX_PATH does not work by itself.
The problem during the build that caused incompatibility issues turned out to be
CMAKE_PREFIX_PATH
, which instructs CMake to look in that directory during compilation. This is why the packages in/opt/conda/lib
were interfering with the compile, even though only/opt/conda/bin
was included. Put/opt/conda/bin
to the front of thePATH
to ensure that the latest packages are used instead of system packages. Remove or comment outCMAKE_PREFIX_PATH
in PyTorch build since it appears to be the cause of many problems.