Ubuntu 20....NVIDIA nvcc environment

**`please back up your file : .bashrc` ** 
just in case you will shit your pans.....

CTRL+ALT+T : open a terminal

sudo vim /home/(your user_name)/.bashrc
(Hi, sweetheart, don’t edit /etc/profile or /etc/*****, believe me Ubuntu will crash, and you, my dear mate, you will shit your pans in everywhere because I did it again and again… )

add:

export PATH="/usr/local/cuda-11.2/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH"
wq(write and quit, my dear.....jesus)
source .bashrc
nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Jan_28_19:32:09_PST_2021
Cuda compilation tools, release 11.2, V11.2.142
Build cuda_11.2.r11.2/compiler.29558016_0

nvidia-smi 

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro RTX 4000...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   54C    P5    13W /  N/A |    592MiB /  7982MiB |      4%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       964      G   /usr/lib/xorg/Xorg                142MiB |
|    0   N/A  N/A      1577      G   /usr/lib/xorg/Xorg                242MiB |
|    0   N/A  N/A      1694      G   /usr/bin/gnome-shell               97MiB |
|    0   N/A  N/A      2473      G   ...AAAAAAAAA= --shared-files       94MiB |
+-----------------------------------------------------------------------------+
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值