Skip to content

Commit b0c3fc3

Browse files
authored
Update cuda.md
1 parent 2136b86 commit b0c3fc3

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/ai/cuda.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@
55
- [pybind11 documentation](https://pybind11.readthedocs.io/en/stable/basics.html)
66
- [Using pybind11](https://people.duke.edu/~ccc14/sta-663-2016/18G_C++_Python_pybind11.html)
77
- [Use pybind11 for a detailed but simple example](https://iamsorush.com/posts/pybind11-robot/)
8-
- 切换CUDA版本步骤: [[CSDN](https://blog.csdn.net/u013905398/article/details/103799621)]
98
- 查看你的显卡的情况:
109
- nvitop: [[Github](https://github.com/XuehaiPan/nvitop)]
1110
- gpustat: [[Github](https://github.com/wookayin/gpustat)]
1211
- nvidia-smi
12+
- - 切换CUDA版本步骤
13+
- 删除软连接
14+
```shell
15+
cd /usr/local
16+
ls -l cuda #查看cuda的软链接
17+
sudo rm -rf cuda
18+
sudo ln -s /usr/local/cuda-10.0 /usr/local/cuda # 更换为对应的cuda
19+
```
20+
- 添加环境变量
21+
```shell
22+
# 假设你使用的是bash,那么你需要打开.bashrc
23+
export PATH="/usr/local/cuda-10.0/bin:$PATH"
24+
export LD_LIBRARY_PATH="/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH"
25+
export CUDA_HOME=/usr/local/cuda
26+
```
27+
在完成上述步骤后,你需要 source ~/.bashrc

0 commit comments

Comments
 (0)