Could not load library libcudnn_adv_train.so.8 error on lambda workstation

Yes, that can work also, but it is incomplete.

What that does is copying the cuDNN library in the system wide PATH.
That will help if you are not using the standard python which knows where to find it for the specific build of pytorch or tensorflow.

If you are using Anaconda, that installs all of its own python, pytorch, tensorflow, cuda-toolkit and cudnn. However, Anaconda does not point the LD_LIBRARY_PATH to the new location.
$ export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}

And if you are using python venv or virtualenv - I normally install the appropriate cuDNN manually for those virtual environments for the given build I am using.

And docker would have that in the image if it had tensorflow/cuDNN.