how to size down the linux distrabution with cuda?

I deployed my cuda application on ubuntu linux amd64 achitecture.
The total size of the ubuntu linux is amount to 1.2GB.
I want do size down the ubuntu compute enviroment with cuda.
Could anyone give some advice on how to do it ?

It isn’t obvious what you are trying to do. Are you trying to make

  1. a live CD image
  2. network bootable image
  3. a VM image

or something else?

If option 1, then there are literally millions of bootable 640Mb CD images based on the Knoppix prototype that you could use
If option 2, then something like perceus is a good starting point (I gave you information about that earlier)
If option 3, I am not sure, but I am willing to bet that there are minimal “off the shelf” VMware or VirtualBox images you could use as a starting point.

If you are trying to do something else, then the recipe is simple - prune the package tree as much as you can. There is usually plenty of unnecessary cruft you can get rid of. The barest CUDA install (so no X11 or build environment) doesn’t need much more than kernel + drivers + CUDA runtime libraries plus glibc runtime support and a shell. The internet is full of howto/tutorial documents describing flash rom sized minimal installs for turning i386 equipped toasters into internet appliance. Google is your friend.