From 677f9e633d5142879c4ec1a6ecbbd46139187cda Mon Sep 17 00:00:00 2001 From: Kelvie Wong Date: Tue, 28 Feb 2023 20:16:37 -0800 Subject: [PATCH] Allow overrding torch libs from /data This is so you can copy the latest cudnn files (you have to extract them from a deb inside a deb from e.g. [1], haven't scripted that part yet) References: [1] https://developer.download.nvidia.com/compute/redist/cudnn/v8.8.0/local_installers/11.8/cudnn-local-repo-ubuntu2204-8.8.0.121_1.0-1_amd64.deb --- services/AUTOMATIC1111/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index 9463baf..1a59fc6 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -62,4 +62,10 @@ if [ -f "/data/config/auto/startup.sh" ]; then popd fi +# Override cudnn lib files from /data/cudnn +if [ -f "/data/cudnn/libcudnn.so.8" ]; then + PYTORCH_PATH=$(python -c "import torch; print(torch.__path__[0])") + cp /data/cudnn/lib* "$PYTORCH_PATH"/lib/ +fi + exec "$@"