dobi icon indicating copy to clipboard operation
dobi copied to clipboard

Is possible set cpu limit for a job?

Open sih4sing5hong5 opened this issue 6 years ago • 3 comments

The docker can limit the CPU resource for a container by --cpus=2.5. How to set this limit with dobi?

Thank you!

sih4sing5hong5 avatar Dec 07 '19 01:12 sih4sing5hong5

It is not possible yet. It would require adding a field to the job resource and passing it through here: https://github.com/dnephin/dobi/blob/master/tasks/job/run.go#L256-L281

dnephin avatar Dec 07 '19 19:12 dnephin

Thank you! May I make a PR for this field?

sih4sing5hong5 avatar Dec 20 '19 03:12 sih4sing5hong5

Yes please, that would be great, thank you!

dnephin avatar Dec 20 '19 17:12 dnephin

Thank you for providing where the code is. The functions is not necessary for now. Close this issue.

sih4sing5hong5 avatar Oct 06 '23 08:10 sih4sing5hong5