cresset-template / cresset

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.
MIT License
715 stars 41 forks source link

Add `0_` in front of the `conda` ldconfig file to indicate that `/opt/conda/lib` is coming first. #132

Closed veritas9872 closed 1 year ago

veritas9872 commented 1 year ago

ldconfig takes configuration files in /etc/ld.so.conf.d in alphabetical order. /etc/ld.so.conf.d/conda.conf happens to be in front of /etc/ld.so.conf.d/libc.conf but this should be made explicit and easy to change. The simplest solution is to add 0_ in front of the file name to make /etc/ld.so.conf.d/0_conda.conf.

veritas9872 commented 1 year ago

On second thoughts, put the conda.conf configuration at the back. The PyTorch official image does not add /opt/conda/lib to LD_LIBRARY_PATH while the AWS DLC images place the directory after /usr/local/lib.