Salt formulas for deployment of NVIDIA hardware-accelerated qubes with cuda support
- SaltStack 97.2%
- Shell 2.8%
| doc | nvidia-driver.md: add troubleshooting section, typo | |
| nvidia_driver/nvidia_driver | create.sls: prevent unnecessary change reports | |
| LICENSE | Initial commit | |
| pillar.example | Update documentation | |
| README.md | README.md: fedora 43 works | |
nvidia-driver
Salt formula for deployment of NVIDIA hardware-accelerated qubes with cuda support
Contents
.
├── doc
│ └── nvidia-driver.md # Guide to this formula
├── LICENSE
├── nvidia_driver
│ └── nvidia_driver
│ ├── create.sls # Create template
│ ├── init.sls # Install drivers
│ ├── nvrun # Run a program in prime environment
│ ├── prime.sls # Install prime environment script (nvrun)
│ └── zero_swap.sls # Set swapiness to 0
├── pillar.example # All available configuration parameters
└── README.md
How to use
-
Upload
nvidia-driverto your salt environmentAny location defined in
file_rootswill work. Usually formulas are installed in/srv/formulas/For example, if you install the formula like this:
/srv/formulas/ └── nvidia_driver └── nvidia_driver ├── create.sls ├── init.sls ├── nvrun ├── prime.sls └── zero_swap.slsYou should set the following
file_roots:file_roots:base:- /srv/salt- /srv/formulas/nvidia_driver -
Configure top file
This example assumes that you handle vm creation and configuration in dom0 separately, see
pillar.exampleif you wantnvidia_driver.createto make templates for you.# /srv/salt/top.slsbase:debian-13-nv:- nvidia_driver- nvidia_driver.zero_swapfedora-42-nv:- nvidia_driver- nvidia_driver.prime -
Apply the state
Don't forget to add
--max-concurrency=1if your vms operate the same devices to prevent them from "fighting" over it.# qubesctl --targets debian-13-nv,fedora-42-nv state.highstate
Current tasks
- Test debian 14 and fedora 43
- document usage via gitfs This could allow invocation of this formula without ever installing anything in dom0 (with a slight drawback of not being able to use nvidia_driver.create)
- Fail if distribuion is not supported
- Use list of dictionaries for
nvidia_driver.createconfiguration - Do whonix as well
- Automate driver package detection on debian
future, maybe:
- rpm repository