Cannot build tensorflow-cpu with cuda installed
@xuesu If you don't explicitly require CUDA for other applications, consider uninstalling it before building TensorFlow-CPU. This will ensure that TensorFlow-CPU doesn't attempt to utilize CUDA libraries during the build process.
If you need both TensorFlow-CPU and CUDA for different projects, consider using separate virtual environments for each. This will isolate the CUDA environment from the TensorFlow-CPU environment, preventing conflicts between the two.

Thank you! I cannot build with cuda installed with `bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package` either...same error...which means I figured out how to build cpu version while unable to build gpu version....I tried Dockerfile in both tensorflow/build and ci  Dear @sushreebarsa , can I get the dockerfile of tensorflow/tensorflow:devel? I tried multiple resources and only this image can both find cuda and c++ standard library....however, cuda 11.2 is too low to compile....
### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.14.0

### Custom code

No

### OS platform and distribution

Linux Ubuntu22.04

### Mobile device

_No response_

### Python version

3.11

### Bazel version

6.1.0

### GCC/compiler version

clang 16.0.6

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

If I installed CUDA, then I would be unable to build TensorFlow with cpu without CUDA.

I installed clang by
```
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
RUN echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list
RUN echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y libllvm-16-ocaml-dev libllvm16 llvm-16 llvm-16-dev llvm-16-doc llvm-16-examples llvm-16-runtime clang-16 clang-tools-16 clang-16-doc libclang-common-16-dev libclang-16-dev libclang1-16 clang-format-16 python3-clang-16 clangd-16 clang-tidy-16 libc++-16-dev libc++abi-16-dev

```

### Standalone code to reproduce the issue

```shell
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin \
    && mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 \
    && wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \
    && dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \
    && cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/ \
    && apt-get update \
    && apt-get -y install cuda
```
then 
 `bazel clean --expunge && bazel build -c opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=1  //tensorflow/tools/pip_package:build_pip_package`
```


### Relevant log output

```shell
I will unable to build tensorflow from source since it keeps warning cannot find the c++ standard library

ERROR: /root/.cache/bazel/_bazel_root/f3e6cea3d5621cddee645150a95a9495/external/llvm-project/llvm/BUILD.bazel:191:11: Compiling llvm/lib/Demangle/Demangle.cpp [for tool] failed: (Exit 1): clang failed: error executing command (from target @llvm-project//llvm:Demangle) /usr/lib/llvm-16/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 ... (remaining 70 arguments skipped)
In file included from external/llvm-project/llvm/lib/Demangle/Demangle.cpp:13:
external/llvm-project/llvm/include/llvm/Demangle/Demangle.h:12:10: fatal error: 'cstddef' file not found
#include <cstddef>
         ^~~~~~~~~
1 error generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.324s, Critical Path: 0.12s
INFO: 39 processes: 36 internal, 3 local.
FAILED: Build did NOT complete successfully
```
```
