cuda&cudnn环境变量配置

cuda&cudnn配置备忘

cuda:

打开:
/etc/profile

写入

export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

执行:

source /etc/profile

测试:

nvcc -V
cat /usr/local/cuda/version.json

cudnn:

sudo cp include/* /usr/local/cuda-11.7/include && \
sudo cp -P lib/* /usr/local/cuda-11.7/lib64 && \
sudo chmod a+r /usr/local/cuda-11.7/include/cudnn*.h /usr/local/cuda-11.7/lib64/libcudnn*

测试:

cat /usr/local/cuda/include/cudnn_version.h

你可能感兴趣的:(ubuntu,深度学习)