Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Nvidia Insight Compute in 2023 containers #183

Open
jfpanisset opened this issue Oct 14, 2023 · 4 comments
Open

Remove Nvidia Insight Compute in 2023 containers #183

jfpanisset opened this issue Oct 14, 2023 · 4 comments

Comments

@jfpanisset
Copy link
Contributor

Nvidia Insight Compute is an interactive debugger for CUDA and OptiX which is taking up almost 1GB in /opt/nvidia in ci-osl:2023 and possibly other containers. It doesn't need to be in there, and we should try to get rid of it to reduce container image bloat.

@jfpanisset
Copy link
Contributor Author

Insight Compute has been added to nvidia/cuda:11.8.0-devel-rockylinux8 between our 2023.0 and 2023.1 releases, unfortunately it's not simple to remove something from a base image and reclaim the space.

@jfpanisset
Copy link
Contributor Author

Nsight Compute gets installed in /opt/nvidia/nsight-compute and takes up 1.5GB as of the 2024.1 container images.

It is owned by the following RPMs:

nsight-compute-2023.3.0-2023.3.0.12-1.x86_64
cuda-nsight-compute-12-3-12.3.0-1.x86_64

where cuda-nsight-compute installs a couple of wrapper scripts:

/usr/local/cuda-12.3/bin/ncu
/usr/local/cuda-12.3/bin/ncu-ui

Although dnf -y erase nsight-compute will remove the RPMs, we would then need to use some third party tool to 'squash" the resulting images, which may not fit well in the build pipeline. So it might be preferable to avoid installing nsight-compute in the first place.

[templates/redhat/devel-dockerfile.j2]](https://gitlab.com/nvidia/container-images/cuda/-/blob/master/templates/redhat/devel-dockerfile.j2?ref_type=heads) in the (Nvidia CUDA Linux Container Image Sources] repo is where Nsight compute gets added to the CUDA base image we build on top of.

@jfpanisset
Copy link
Contributor Author

Perhaps docker-squash could be used to flatten layers after removing nsight-compute from the base image?

@jfpanisset
Copy link
Contributor Author

Seems to work, the following Dockerfile:

FROM nvidia/cuda:12.6.1-devel-rockylinux8
RUN dnf -y erase nsight-compute nvidia-nsight-compute

goes from 7.18GB to 5.93GB after applying docker-squash to the top 3 layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant