We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ca4921 commit 5df3cfbCopy full SHA for 5df3cfb
src/ai/cuda.md
@@ -19,6 +19,16 @@
19
```
20
- 添加环境变量
21
```shell
22
+ # 如果使用的是z-shell请替换`.bashrc`为`.zshrc`
23
+ tee -a ~/.bashrc > /dev/null << 'EOF'
24
+ # CUDA
25
+ export PATH=${PATH}:/usr/local/cuda/bin
26
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
27
+ export CUDA_HOME=/usr/local/cuda # 通过设置软链接`/usr/local/cuda`,可以做到多版本CUDA共存
28
+ EOF
29
+
30
+ # 或者
31
32
# 修改`/etc/profile`以做到多用户、多Shell解释器通用
33
sudo tee -a /etc/profile > /dev/null << 'EOF'
34
# CUDA
@@ -27,4 +37,4 @@
37
export CUDA_HOME=/usr/local/cuda # 通过设置软链接`/usr/local/cuda`,可以做到多版本CUDA共存
38
EOF
39
- 在完成上述步骤后,你需要`source /etc/profile`刷新环境变量或者`reboot`重启
40
+ 在完成上述步骤后,你需要`source ~/.bashrc`(或`source /etc/profile`)刷新环境变量或者`reboot`重启
0 commit comments