Commit f6b1b1a
committed
Ignore NVIDIA_VISIBLE_DEVICES for containers with insufficent privileges
This change ignores the value of NVIDIA_VISIBLE_DEVICES instead of
raising an error when launching a container with insufficient permissions.
This changes the behaviour under the following conditions:
NVIDIA_VISIBLE_DEVICES is set
and
accept-nvidia-visible-devices-envvar-when-unprivileged = false (default: true)
or
privileged = false (default: false)
This means that a user need not explicitly clear the NVIDIA_VISIBLE_DEVICES
environment variable if no GPUs are to be used in unprivileged containers.
Note that this envvar is set to 'all' by default in many CUDA images that
are used as base images.
Signed-off-by: Evan Lezar <[email protected]>1 parent 9751646 commit f6b1b1a
2 files changed
+3
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
| 298 | + | |
300 | 299 | | |
301 | 300 | | |
302 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
544 | 543 | | |
545 | 544 | | |
546 | 545 | | |
| |||
567 | 566 | | |
568 | 567 | | |
569 | 568 | | |
570 | | - | |
| 569 | + | |
571 | 570 | | |
572 | 571 | | |
573 | 572 | | |
| |||
621 | 620 | | |
622 | 621 | | |
623 | 622 | | |
624 | | - | |
| 623 | + | |
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| |||
638 | 637 | | |
639 | 638 | | |
640 | 639 | | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | 640 | | |
648 | 641 | | |
649 | 642 | | |
| |||
0 commit comments