以非root用户身份运行bvlc-caffe docker映像会导致意外的NVCC标志
主机操作系统: ubuntu 14.04
GPU型号: Tesla K80
Cuda司机: 352.93
Docker镜像: bvlc / caffe
基于上层的东西,我们试图在一个bvlc / caffe容器里运行cd /opt/caffe/build && make runtest
,然后成功地看到所有的testing用例通过。
但是,使用以下shell命令稍微修改了bvlc / caffe图像之后:
echo "dastan ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
useradd dastan && adduser dastan sudo
mkdir -p /home/dastan && chown -R dastan:dastan /home/dastan
然后作为dastan
(非root用户)和cd /opt/caffe/build; sudo make runtest
cd /opt/caffe/build; sudo make runtest
,我们得到的CUDA driver version is insufficient for CUDA runtime version
在testing用例中CUDA driver version is insufficient for CUDA runtime version
。
我比较了root
和dastan
(非根)情况下的预编译消息,最终发现root下的CUDA NVCC flags
为sm_37
, non-root
下sm_20 sm_21 sm_30 sm_35 sm_50
,消息Automatic GPU detection failed. Building for all known architectures.
Automatic GPU detection failed. Building for all known architectures.
任何人都可以解释:CUDA的根和非根下有什么不同?