Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
Description:

Log:
  • Loading branch information
mikigo committed Feb 1, 2024
1 parent e4b9061 commit 00a9466
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 44 deletions.
44 changes: 0 additions & 44 deletions docs/人工智能/图像/MMDetection入门基础.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,50 +98,6 @@ pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 torchaudio==0.7.0 -f htt
pip install mmcv-full==1.3.3 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
```

### 4、安装显卡驱动

显卡为 `GTX1660`,驱动版本为 430,驱动下载地址:https://www.nvidia.cn/Download/Find.aspx?lang=cn

```shell
CTRL+ALT+F2 进入tty
```

禁用 nouveau 驱动

```shell
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
```

填入:

```shell
blacklist nouveau
options nouveau modeset=0
```

刷新配置文件

```shell
sudo update-initramfs -u
```

reboot 重启后再进入 tty

关闭图像界面,输入命令关闭图像界面

```shell
sudo service lightdm stop
```

安装驱动

```shell
sudo chmod a+x NVIDIA-Linux-x86_64-430.run
sudo ./NVIDIA-Linux-x86_64-430.run
```

reboot重启,nvidia-smi查看安装状态。注意看下cuda版本,10.1,driver版。

## 三、数据标注

标注之前需要先转换图片大小,并且以数字命名,每组命名递增
Expand Down
91 changes: 91 additions & 0 deletions docs/人工智能/图像/NVIDIA驱动&CUDA&cuDNN安装.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# NVIDIA驱动&CUDA&cuDNN安装

## 驱动安装

以显卡 `GTX3060` 举例,驱动下载地址:https://www.nvidia.cn/Download/Find.aspx?lang=cn

把驱动下载好。

1、进入 `tty`

```shell
CTRL+ALT+F2
```

2、禁用 nouveau 驱动:

```shell
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
```

3、填入:

```shell
blacklist nouveau
options nouveau modeset=0
```

4、刷新配置文件

```shell
sudo update-initramfs -u
```

5、`reboot` 重启后再进入 `tty`

6、关闭图像界面,输入命令关闭图像界面:

```shell
sudo service lightdm stop
```

7、安装驱动

```shell
sudo chmod a+x NVIDIA-Linux-x86_64-430.run
sudo ./NVIDIA-Linux-x86_64-430.run
```

8、`reboot` 重启,`nvidia-smi` 查看安装状态。

![](/nvidia_assets/1.png)

注意看下 `cuda` 版本,后面要用。

## CUDA安装

CUDA 是 NVIDIA 的并行计算框架

`CUDA` 下载:https://developer.nvidia.com/cuda-toolkit-archive

根据前面查看到 `cuda` 版本选择对应的包。

![](/nvidia_assets/2.png)

按照网站下面的提示一顿操作就行了。

```shell
wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run
sudo sh cuda_12.2.0_535.54.03_linux.run
```

输入 `nvcc -V` 查看,如果正常就说明安装好了:

## cuDNN

cuDNN 是 NVIDIA 打造的针对深度神经网络的加速库,是一个用于深层神经网络的 GPU 加速库。

下载:https://developer.nvidia.com/rdp/cudnn-archive

需要先注册为开发者。

然后选择对应版本的 cuDNN 版本下载,注意和 CUDA 版本对应。

然后执行安装:

```shell
sudo dpkg -i cudnn-local-repo-ubuntu2004-8.9.7.29_1.0-1_amd64.deb
```



0 comments on commit 00a9466

Please sign in to comment.