coreweave / ml-containers

MIT License
19 stars 3 forks source link

fix(torch-extras): Add `-prune` to `find` & `rm -r` Apex downloader step #31

Closed Eta0 closed 1 year ago

Eta0 commented 1 year ago

find, -prune, and rm -r

This change fixes a bug causing the apex-downloader step to fail while deleting unnecessary files post-downloading.

Without the -prune flag, the find call in use attempts to rm -r directories within already-deleted subtrees and exits with an error code despite producing correct results. With the -prune flag, acting on a directory instead removes its children from further find processing, which is correct for already-recursive commands such as rm -r.