Skip to content

Commit

Permalink
Update cuda.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhikangNiu authored Aug 23, 2024
1 parent 2136b86 commit b0c3fc3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/ai/cuda.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,23 @@
- [pybind11 documentation](https://pybind11.readthedocs.io/en/stable/basics.html)
- [Using pybind11](https://people.duke.edu/~ccc14/sta-663-2016/18G_C++_Python_pybind11.html)
- [Use pybind11 for a detailed but simple example](https://iamsorush.com/posts/pybind11-robot/)
- 切换CUDA版本步骤: [[CSDN](https://blog.csdn.net/u013905398/article/details/103799621)]
- 查看你的显卡的情况:
- nvitop: [[Github](https://github.com/XuehaiPan/nvitop)]
- gpustat: [[Github](https://github.com/wookayin/gpustat)]
- nvidia-smi
- - 切换CUDA版本步骤
- 删除软连接
```shell
cd /usr/local
ls -l cuda #查看cuda的软链接
sudo rm -rf cuda
sudo ln -s /usr/local/cuda-10.0 /usr/local/cuda # 更换为对应的cuda
```
- 添加环境变量
```shell
# 假设你使用的是bash,那么你需要打开.bashrc
export PATH="/usr/local/cuda-10.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH"
export CUDA_HOME=/usr/local/cuda
```
在完成上述步骤后,你需要 source ~/.bashrc

0 comments on commit b0c3fc3

Please sign in to comment.