Repository: pytorch
Issue: CUDA cannot be found
Labels: module: build,module: cuda,triaged,module: arm

## 🐛 Bug

When compiling on Docker for L4T with CUDA 10.2 installed, torch doesn't compile with due to not finding CUDA.

## To Reproduce

Clone the [Torch Samples](https://github.com/pytorch/examples) repo. Follow the instructions in [this README](https://github.com/pytorch/examples/tree/master/cpp/mnist).

Error output when running the cmake command:

```
 cmake -DCMAKE_PREFIX_PATH=/root/.local/lib/python3.6/site-packages/torch/ ..
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "10.0")
CMake Warning at /root/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:31 (message):
  Caffe2: CUDA cannot be found.  Depending on whether you are building Caffe2
  or a Caffe2 dependent library, the next warning / error will give you more
  info.
Call Stack (most recent call first):
  /root/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
  /root/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
  CMakeLists.txt:5 (find_package)


CMake Error at /root/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:90 (message):
  Your installed Caffe2 version uses CUDA but I cannot find the CUDA
  libraries.  Please set the proper CUDA prefixes and / or install CUDA.
Call Stack (most recent call first):
  /root/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/root/Github/examples/cpp/mnist/build/CMakeFiles/CMakeOutput.log".
See also "/root/Github/examples/cpp/mnist/build/CMakeFiles/CMakeError.log".
```

## Expected behavior

Code should compile as described in the readme.

## Environment

```
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Ubuntu 18.04 LTS
GCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2

Python version: 2.7
Is CUDA available: N/A
CUDA runtime version: 10.0.326
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_etc.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0

Versions of relevant libraries:
[pip3] numpy==1.13.3
[conda] Could not collect
```



cc @malfet @ngimel