dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

Is possible set cpu limit for a job? #169

Closed sih4sing5hong5 closed 11 months ago

sih4sing5hong5 commented 4 years ago

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

Thank you!

dnephin commented 4 years ago

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

sih4sing5hong5 commented 4 years ago

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

dnephin commented 4 years ago

Yes please, that would be great, thank you!

sih4sing5hong5 commented 11 months ago

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