diff options
author | kernelmethod <17100608+kernelmethod@users.noreply.github.com> | 2023-05-25 18:51:47 +0000 |
---|---|---|
committer | kernelmethod <17100608+kernelmethod@users.noreply.github.com> | 2023-05-25 18:51:47 +0000 |
commit | d29fe44e467c6ecc435f561a776ead8f5116f077 (patch) | |
tree | 722660cef67ad47db78b992c3afd807970ce1d54 /webui.sh | |
parent | 89f9faa63388756314e8a1d96cf86bf5e0663045 (diff) | |
download | stable-diffusion-webui-gfx803-d29fe44e467c6ecc435f561a776ead8f5116f077.tar.gz stable-diffusion-webui-gfx803-d29fe44e467c6ecc435f561a776ead8f5116f077.tar.bz2 stable-diffusion-webui-gfx803-d29fe44e467c6ecc435f561a776ead8f5116f077.zip |
Small fixes to prepare_tcmalloc for Debian/Ubuntu compatibility
- /usr/sbin (where ldconfig is usually located) is not typically on users' PATHs by default, so we set that variable before trying to run ldconfig.
- The libtcmalloc library is called libtcmalloc_minimal on Debian/Ubuntu systems. We now check whether libtcmalloc_minimal exists when running prepare_tcmalloc.
Diffstat (limited to 'webui.sh')
-rwxr-xr-x | webui.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -183,7 +183,7 @@ fi # Try using TCMalloc on Linux prepare_tcmalloc() { if [[ "${OSTYPE}" == "linux"* ]] && [[ -z "${NO_TCMALLOC}" ]] && [[ -z "${LD_PRELOAD}" ]]; then - TCMALLOC="$(ldconfig -p | grep -Po "libtcmalloc.so.\d" | head -n 1)" + TCMALLOC="$(PATH=/usr/sbin:$PATH ldconfig -p | grep -Po "libtcmalloc(_minimal|)\.so\.\d" | head -n 1)" if [[ ! -z "${TCMALLOC}" ]]; then echo "Using TCMalloc: ${TCMALLOC}" export LD_PRELOAD="${TCMALLOC}" |