truss icon indicating copy to clipboard operation
truss copied to clipboard

Local docker runs should honor resource specifications in config

Open pankajroark opened this issue 2 years ago • 3 comments

We don't enforce any limits right now, but we should to mimic production deployments and let one tune these settings well locally.

pankajroark avatar Feb 06 '23 23:02 pankajroark

We'll need to pass the right settings in https://github.com/basetenlabs/truss/blob/main/truss/truss_handle.py#L194 https://docs.docker.com/config/containers/resource_constraints/

pankajroark avatar Feb 06 '23 23:02 pankajroark

What's the expected behavior around the use_gpu flag and the new accelerator spec?

bolasim avatar Feb 14 '23 21:02 bolasim

What's the expected behavior around the use_gpu flag and the new accelerator spec?

Good point, this needs more thought. It's unlikely that someone would have the same accelerator locally as they have in a deployed environment. My worry is, in trying to enforce strict use of specs we may make local dev harder. I think we should honor CPU and memory, as those seem like easy pickings. We can revisit use_gpu and accelerator at a later point, in the meanwhile we could show a message indicating any mismatch of gpu/accelerator settings in the docker environment used.

pankajroark avatar Feb 14 '23 22:02 pankajroark