Ceres Build fails with: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/cuda_vector.cc.o' failed

Hello, I am looking to install ceres solver in a docker environment, using the following command:

# Install Ceres Solver
RUN git clone https://ceres-solver.googlesource.com/ceres-solver
RUN mkdir -p ceres-solver/build
WORKDIR ceres-solver/build
RUN cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. && make -j$(nproc) && make install && make clean

I get the following error, which I am not able to resolve.

make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/cuda_vector.cc.o] Error 1
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1083: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/cuda_vector.cc.o' failed
make[1]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/all] Error 2
CMakeFiles/Makefile2:154: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/all' failed
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Removing intermediate container f211b73c15c4
The command '/bin/sh -c cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. && make -j$(nproc) && make install && make clean' returned a non-zero code: 2

Any feedback would be helpful. I am installing using the pip command:
RUN pip install cmake --upgrade

Nitin Bansal

There is more context needed here. In a parallel make build (make -jN), the error can be quite a bit away from the end of the output (as an error only causes make to no longer start new jobs; already running jobs will complete and cause output). Generally I search for error: from the end and go from there.