Please update/fix the tutorial of how to automatically add cuda/dnn path into environment when activate conda environment
editing sh file to new commands proposed by @TomMeowMeow  automated the system path The issue will move to closed status once the [#2214](https://github.com/tensorflow/docs/pull/2214) is merged. Thanks! Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60183">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60183">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Documentation Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

tf 2.12

### Custom Code

No

### OS Platform and Distribution

_No response_

### Mobile device

Linux Ubuntu 22.04.2

### Python version

3.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
Hi guys,

First thanks for the support from TF 2.0 and cuda. I think there is a typo in tutorial which results the cuda would not be found by TF. In the main tutorail from https://www.tensorflow.org/install/pip#linux_setup (access from 2023.3.31). 

Where you mention "For your convenience it is recommended that you automate it with the following commands. The system paths will be automatically configured when you activate this conda environment."

and the code be given is:

"mkdir -p $CONDA_PREFIX/etc/conda/activate.d
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh"

This is somewhat problematic as this would only put "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib" inside the file "env_vars.sh",
and when I activate the conda environment, the cuda path was not automatically loaded simply as "CUDNN_PATH" was not defined. This would then result "GPU not found etc.. no GPU, cuda cannot be load etc.. fix issue etc...". 

I believe the fix should be (may not be universal correct but works for me,please help check)"
"
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
"

In this case, the file "env_vars.sh" would contain:

"
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib
"

Now finally, everytime I activate the conda environment, I no longer need to manually set up the environment path for CUDA. 

I know this is somewhat fundamental, but this could be misleading to those high level devloper, and this could cause that CUDA cannot find GPU error without much detailed info. So please consider fixing this in the tutorial webpage: https://www.tensorflow.org/install/pip#linux_setup


Plus, another issue that one needs to update conda before install cuda, but if one is using environment module where the Anaconda was not installed in the global envrionment. Then one needs to be root or other account which has access to update the conda for that specific Anaconda version. 

Specifically, say the Anaconda was installed in 

/home/software/GlobalModules/apps/binapps/anaconda3/2020.07

If we activate conda envrionment and run:
conda upgrade -n base conda

it will return error no permissions (as the software was centrally distributed that user has no write access to the global installed pacakge (imaging that many users are sharing a HPC). 

In which case, one has to be the root user or other user has write access to the folder where we install the Anaconda to update the conda for this version 

However, this is not an issue of tensorflow of course, as it will only happen if one is using envrionment module. I provide here just in case anyone fails to update conda to install cuda etc.., as if the update of conda fails, then it will fail to install cuda somehow for no reason. Thanks.
```


### Standalone code to reproduce the issue

```shell
Note that I have installed environment module so this may not happen when only a universal conda was installed. 

#connect to some server
ssh -X -p 3060 user@somelinuxserver.com 

#environment module load anaconda
module load apps/binapps/anaconda3/2020.07

#activate (assume this venvPy3_8 was created following tutorial from https://www.tensorflow.org/install/pip#linux_setup)
conda activate venvPy3_8

#Try install cuda in virtual envrionment (as suggested)
conda install -c conda-forge cudatoolkit=11.8.0
pip install nvidia-cudnn-cu11==8.6.0.163

#Specify envirionment path (suppose to make my life easier but in fact not)
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh

#pip install tensorflow==2.12.*

#Verify CPU setup (should return the CPU and not note that GPU not found)
python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
#No GPU found etc...

#Veerify GPU setup (should return the physical GPU if successful)
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
#No GPU found etc...

#Fix, try instead (Go above step of enrionment path)
#Specify envirionment path 
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
```


### Relevant log output

```shell
Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
```
</details>