首先,将空间从谷歌硬盘装载到Colab虚拟机。
要做到这一点:
然后,安装
.run
脚本来自
https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2023_2/nsightsystems-linux-public-2023.2.1.122-3259852.run
在您的虚拟机上。
运行安装程序,当提示安装路径时,选择Google Drive安装的目录。
Nsight Systems将其所有依赖项安装在一个位置,因此选择Google Drive目录是可以的。
如果你有
nsys
安装在目录中,您可以将内容复制到Google Drive安装的目录中。
或者,您可以直接在Colab虚拟机上安装最新的Nsight Systems,方法是:
!wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/nsight-systems-2023.2.3_2023.2.3.1001-1_amd64.deb
!apt update
!apt install ./nsight-systems-2023.2.3_2023.2.3.1001-1_amd64.deb
!apt --fix-broken install
确保Ubuntu版本和机器架构在
wget
链接匹配您的Colab配置。
检查您是否可以使用
!cat /etc/os-release | grep "VERSION_ID"
!echo "Machine's architecture: `uname -i`"