How to use nsys in google colab

368 views Asked by At

I have an upload of nsight-system and install it in Google Colab and use these command about nsys fine.

But when turn it off and on again, it disappeared. How to save to when ever turn on again I don't need to install again.

I have no idea how to fix it.

1

There are 1 answers

0
Zois Tasoulas On

Start by mounting space from your Google Drive to your Colab VM.

To do that:

Then, get the installation .run script from https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2023_2/nsightsystems-linux-public-2023.2.1.122-3259852.run on your VM. Run the installer, and when prompted about the installation path, choose the Google Drive mounted directory.

Nsight Systems installs all its dependencies in one place, so choosing the Google Drive directory is ok.

If you have nsys installed in a directory, you can copy the contents to your Google Drive mounted directory.

Alternatively, you can install the latest Nsight Systems directly on your Colab VM with:

!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

Make sure that the Ubuntu version and machine architecture on the wget link match your Colab config. To check that you could use

!cat /etc/os-release | grep "VERSION_ID"
!echo "Machine's architecture: `uname -i`"