ROCm / ROCm-docker

Dockerfiles for the various software layers defined in the ROCm software platform
MIT License
422 stars 64 forks source link

ROCm pytorch images size #120

Open 88Ocelot opened 9 months ago

88Ocelot commented 9 months ago

The current size of the ROCm PyTorch Docker image, particularly rocm/pytorch:latest, is significantly large, consuming approximately 54 GB on disk when uncompressed. A more streamlined version, rocm-torch-slim, has been created with a reduced size of around 28 GB through the use of a multistage build(Dockerfile). Further optimizations are possible, and experimenting with the configuration may lead to an even smaller image size.

BTW: Why do we need to install ROCm binaries on the host system if the Docker image performs the heavy lifting?

serhii-nakon commented 6 months ago

Also possible in this way https://github.com/serhii-nakon/rocm_gfx1012_pytorch/blob/main/Dockerfile#L197-L204 it result only few gigabytes https://hub.docker.com/layers/serhiin/rocm_gfx1012_pytorch/ubuntu2204_rocm543_pytorch22_py213/images/sha256-0b3f4951135940fa59522fd530352dfefeca750bb0d808f1d8b177797490881d?context=explore

Before copying from original container better to remove all sources