Repository: pytorch
Issue: path in WORKSPACE
Labels: triaged,module: bazel

### 🐛 Describe the bug

When I try to get the dependencies with `bazel query 'deps(//:torch)' --output graph > graph.in`, It will fail and get the following outputs.
`Loading: 0 packages loaded
ERROR: Error fetching repository: java.io.IOException: The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist.
ERROR: /workspace/pytorch/c10/cuda/BUILD.bazel:4:15: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//c10/cuda:cuda'
Loading: 15 packages loaded
ERROR: /workspace/pytorch/BUILD.bazel:371:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_nvrtc'
ERROR: /workspace/pytorch/BUILD.bazel:371:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_nvrtc'
ERROR: /workspace/pytorch/BUILD.bazel:371:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_nvrtc'
ERROR: /workspace/pytorch/BUILD.bazel:1473:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:caffe2_cuda'
ERROR: /workspace/pytorch/BUILD.bazel:1473:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:caffe2_cuda'
ERROR: /root/.cache/bazel/_bazel_root/f1885fd2033fa9405d092b9e0e17aa9b/external/tensorpipe/BUILD.bazel:163:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '@tensorpipe//:tensorpipe_cuda'
ERROR: /workspace/pytorch/BUILD.bazel:398:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda_cpp'
ERROR: /workspace/pytorch/BUILD.bazel:398:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda_cpp'
ERROR: /workspace/pytorch/BUILD.bazel:398:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda_cpp'
ERROR: /workspace/pytorch/BUILD.bazel:422:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda'
ERROR: /workspace/pytorch/BUILD.bazel:422:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda'
ERROR: /workspace/pytorch/BUILD.bazel:422:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:aten_cuda'
ERROR: /workspace/pytorch/BUILD.bazel:1650:11: no such package '@cuda//': The repository's path is "/usr/local/cuda" (absolute: "/usr/local/cuda") but this directory does not exist. and referenced by '//:torch'
ERROR: Evaluation of query "deps(//:torch)" failed: errors were encountered while computing transitive closure
Loading: 17 packages loaded
Loading: 17 packages loaded`

I think the reasons are that in WORKSPACE, the path for "cuda" and "cudnn" are not correct.
https://github.com/pytorch/pytorch/blob/master/WORKSPACE#L191


### Versions

Collecting environment information...
PyTorch version: 1.13.0a0
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.22.1
Libc version: glibc-2.17

Python version: 3.7.13 (default, Mar 29 2022, 02:18:16)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-74-generic-x86_64-with-debian-buster-sid
Is CUDA available: False
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti

Nvidia driver version: 450.102.04
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] numpy==1.21.5
[pip3] torch==1.13.0a0+gitunknown
[pip3] torchaudio==0.7.0a0+a853dff
[pip3] torchelastic==0.2.0
[pip3] torchtext==0.8.0a0+0f911ec
[pip3] torchvision==0.8.0a0
[conda] _pytorch_select           0.1                       cpu_0  
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.0.221             h6bb024c_0  
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] magma-cuda110             2.5.2                         1    pytorch
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-include               2022.1.0           h06a4308_224  
[conda] mkl-service               2.4.0            py37h7f8727e_0  
[conda] mkl_fft                   1.3.1            py37hd3c417c_0  
[conda] mkl_random                1.2.2            py37h51133e4_0  
[conda] numpy                     1.21.5           py37he7a7128_2  
[conda] numpy-base                1.21.5           py37hf524024_2  
[conda] pytorch                   1.7.1           py3.7_cuda11.0.221_cudnn8.0.5_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torch                     1.13.0a0+gitunknown          pypi_0    pypi
[conda] torchaudio                0.7.2                      py37    pytorch
[conda] torchelastic              0.2.0                    pypi_0    pypi
[conda] torchtext                 0.8.1                      py37    pytorch
[conda] torchvision               0.8.2           cpu_py37ha229d99_0