Building the exact same docker images as seen in Docker Hub

Hi,
Recently I have been building my own docker images, but I find them to be much larger than the official ones, at around 18GB. In addition, I am getting different performance characteristics within comfyUI.

Can somepne confirm the exact command I need to run to produce the pytorch/pytorch:2.7.1-cuda12.6-cudnn9-devel docker image?

I am currently building using the docker.Makefile, but recently noticed the .ci/docker/build.sh file and I’m unsure which I should use, and what commands to pass in to get the same exact images.

Thanks

Check the Dockerfile in our repository which just pip installs the binaries if I’m not mistaken as seen here.