Getting Started


#41

How to add a device constraints to a k8s charm , for example:
juju deploy nvidia-example-k8s --constraints nvidia.com/gpu=3,nvidia-tesla-p100


#42

Charms can be deployed using the --device directive, similar to how --storage works.
The charm needs to declare that it requires devices, and from there, at deploy time, you bind those device declarations to a suitable node.

For example, a charm would have something like this in metadata.yaml:

devices:
  bitcoinminer:
    type: nvidia.com/gpu
    count: 1

And then at deploy time you can either do a straight deploy and the pod will be scheduled to run on any node with a single Nvidia GPU, or you can ask for something more specific like in your example:

juju deploy foo --device bitcoinminer=3,nvidia.com/gpu,nvidia-tesla-p100