Dockerfile build RUN cmd fails but interactive works

I’m running into an issue where building a Dockerfile fails at a ‘make’ command but if I run the container interactively and run the make it succeeds. Specifically the make command seems to be not seeing a file:
make[2]: *** No rule to make target /usr/local/nvidia/lib64/, needed by bin/gpu-example-alpha_comp. Stop.
But this is based on nvidia/cuda:8.0-cudnn5-devel and appears to exist, i.e. if I run -it the container:

root@cf5637b85467:/opt/opencv/opencv/build# ll /usr/local/nvidia/lib64/libcuda*.*
lrwxrwxrwx 1 999 999 17 Nov 21 20:42 /usr/local/nvidia/lib64/ ->
lrwxrwxrwx 1 999 999 17 Nov 21 20:42 /usr/local/nvidia/lib64/ ->
-rw-r--r-- 2 root root 8219624 Sep 2 02:25 /usr/local/nvidia/lib64/
and make completes without issue if I manually run make (I tried running from both /bin/bash and /bin/sh).

The only thing I can see is the user & group 999 of the .so link, but I don’t know if that’s relevant. I’m not sure what to try at this point, any suggestions? Full Dockerfile would be below, but somehow it’s interpreted by the forum software as containing more than 2 “links”, so, I had to abridge it:
FROM nvidia/cuda:8.0-cudnn5-devel

apt-get stuff

pip stuff

# Install opencv and opencv_contrib
WORKDIR /opt/opencv
RUN git clone --depth 1 &&
git clone --depth 1

WORKDIR /opt/opencv/opencv/build
-D OPENCV_EXTRA_MODULES_PATH=/opt/opencv/opencv_contrib/modules
-D CUDA_CUDA_LIBRARY=/usr/local/nvidia/lib64/
RUN make -j8
RUN make install


This is a reply regarding issue i am too facing in Nvidia Jetson Tx2. I was not able to install Docker according to steps given in docker docs. I get the error “Package at does not support system architecture arm64” please guide me how to install Docker on Nvidia Jetson Tx2 which is ARMv8 processor.