安装
RUN wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/013/linux-x64/cuda-repo-l4t-8-0-local_8.0.84-1_arm64.deb
RUN wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/013/linux-x64/libcudnn6_6.0.21-1+cuda8.0_arm64.deb
RUN dpkg -R --install *.deb
RUN apt-get update && apt-get install -y --no-install-recommends cuda-toolkit-8.0 libcudnn6
配置环境变量
sudo gedit /etc/bash.bashrc
在文件的末尾加入如下
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
或者
echo "# Add CUDA bin & library paths:" >> ~/.bashrc
echo "export PATH=/usr/local/cuda-8.0/bin:$PATH" >> ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc
然后cuda就配置完毕了,运行
nvcc -V
查看一下cuda版本