triton-inference-server / triton_cli

Triton CLI is an open source command line interface that enables users to create, deploy, and profile models served by the Triton Inference Server.
48 stars 2 forks source link

Iteratively deleting model directories when running `triton remove -m all` #85

Closed KrishnanPrash closed 3 weeks ago

KrishnanPrash commented 3 weeks ago

Currently, when running through the quickstart example, the docker run ... command to start the container, directly mounts /root/models to the host.

So, when running triton remove -m all, the current workflow attempts to delete the entire folder /root/models, which results in the error OSError: [Errno 16] Device or resource busy: '/root/models'.

This is because a folder that is directly mounted through docker cannot be deleted.

In order to remedy this, we can traverse through the model repository and delete the contents, without deleting the entire folder.