wsl-ubuntu配置cuda-tensorrt开发环境

WSL ubuntu20配置CUDA-CUDNN-TensorRT

  1. 官方安装cuda
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/ /"
sudo apt update
sudo apt- -y install cuda

备注:如果add-apt-repository被墙了,可以WSL设置一下apt的网络代理,在/etc/apt/apt.conf.d中创建文件proxy.conf,写入Acquire::http::Proxy "http://proxy_ip:port";

  1. 安装cudnn(cuda通过apt安装成功后)
sudo apt install libcudnn8-dev
  1. 安装TensorRT
    先在官网中下载需要的deb local repo格式的安装文件
sudo dpkg -i your_tensorrt_repo.deb
sudo apt update
sudo apt install tensorrt

你可能感兴趣的:(wsl-ubuntu配置cuda-tensorrt开发环境)