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
This commit is contained in:
Kelvie Wong 2023-02-28 20:16:37 -08:00
parent aa69f11230
commit 677f9e633d

View file

@ -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 "$@"