jetson-containers icon indicating copy to clipboard operation
jetson-containers copied to clipboard

Reduce docker image size with multi-stage builds

Open felrock opened this issue 3 years ago • 1 comments

Are there any examples of adding a multi-state build to the Dockerfiles in this repo? For example what to copy from the nvidia jetpack base image and so on. Thankful for any input.

felrock avatar Sep 07 '21 09:09 felrock

The l4t-ml container is a multi-stage build, because it copies the Python modules from the l4t-pytorch and l4t-tensorflow containers. However this is mostly a time-saver instead of space-saver. I think it would be difficult to further reduce image size without removing packages - which could be fine if you don't need them.

dusty-nv avatar Sep 07 '21 19:09 dusty-nv