Docker-py: Add support for --cpus run flag

Created on 21 Feb 2018  路  3Comments  路  Source: docker/docker-py

In Docker 1.13 or higher --cpus is the suggested option to configure CPU quota.
Option doesn't seem to be supported at the moment.
https://docker-py.readthedocs.io/en/stable/containers.html

Any chance we could add support for the --cpus run flag?

kinquestion

Most helpful comment

It's called nano_cpus in the API

All 3 comments

It's called nano_cpus in the API

For future reference, you have to provide the number of CPUs multiplied by 10^9
e.g. nano_cpus=2000000000 for 2 CPUs

Was this page helpful?
0 / 5 - 0 ratings