Removing cuda-samples is problematic because of bad debian dependencies

In order to save space in my NX platform, I’ve tried removing the cuda-samples-10-2 package.

However, since cuda-toolkit-10-2 depends on this package, apt is also removing cuda-toolkit-10-2 package. This has two side effects:

  1. Marks many required cuda packages as “not needed” - and they will be removed in the next apt autoremove`
  2. nvidia-container-csv-cuda depends on cuda-toolkit-10-2 and therefore is removed as well

I was thinking to not install cuda-toolkit-10-2 metapackage, and install the underlying packages that I need, but then I can’t install nvidia-container-csv-cuda (because it depends on the cuda-toolkit-10-2 metapackage).

I see two possible solutions for this

  1. Make nvidia-container-csv-cuda not depend on the cuda-toolkit-10-2 metapackage, and instead depend on the correct cuda packages it actually needs.
  2. cuda-toolkit-10-2 debian should mark cuda-samples-10-2 as Recommends or Suggests and not Depends. This will allow removing cuda-samples-10-2 without affecting the cuda-toolkit-10-2 installation.

Hopefully this will be fixed in later versions…

EDIT: same problem with libnvinfer-samples & tensorrt metapackage

Thanks,
Koby

1 Like

Hi,

1. This because our container for Jetson mounts CUDA toolkit from the host directly.
Remove the library from the host will lead to no CUDA can be used inside the container.
So the dependency is reasonable for me.

2. We will feedback this to our internal team.
Will update more information with you later.

Thanks.

Hi,

Thanks for you answers, few responses:

Just to make myself clear, the dependency on CUDA makes sense of course. The problem is that the dependency is on the cuda-toolkit-10-2 package, which doesn’t provide any libraries, it is just a metapackage. I’m sure that it can depend on the actual library package instead.
I’m not an expert in debian packaging, but it does seem problematic to depend on a metapackage like that.

Also worth mentioning that the same metapackage dependency exist in another set of packages as well: nvidia-container-csv-tensorrt and nvidia-l4t-jetson-multimedia-api depend on tensorrt (which is also just a metapackage, without any actual files in it), and therefore libnvinfer-samples (almost 1GB) can’t be removed.

I think the easiest solution is that the nvidia-container-csv-cuda, nvidia-container-csv-tensorrt and nvidia-l4t-jetson-multimedia-api packages will depend on the specific cuda / tensorrt packages they need.

Thanks

Hi,

Thanks for your suggestion.

We have passed your recommendation to our internal team.
Will update more information if we got any response.

Thanks.

1 Like

Hi,

Thanks for keeping you waiting.

After some internal discussion, we still prefer to include CUDA sample into our toolkit.
It will be good for users to have a complete toolkit rather than a separate library.

For your use case, please try to install the specific packages rather than cuda-toolkit meta-package.

Thanks

I think the proper solution would be to mark the cuda-samples as “Recommends” or “Suggests” in the cuda-toolkit meta package… This way it will be automatically installed but you could uninstall it easily, without removing the metapackage.

Also, the solution you proposed will break installation of packages that depend on the meta-package

Hi,

Thanks for your valuable suggestion.
Unfortunately, our internal team prefers to keep a complete toolkit.

Really sorry for the inconvenience.