Created
August 16, 2023 22:01
-
-
Save nikitawootten/2187beb33d15101fbc3a88329898830d to your computer and use it in GitHub Desktop.
An Arion NixOS module that requests an NVIDIA GPU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ ... }: | |
{ | |
virtualisation.arion.projects.nvidia-test.settings.services.nvidia-test = { | |
service = { | |
image = "nvidia/cuda:12.2.0-base-ubuntu20.04"; | |
command = "nvidia-smi"; | |
}; | |
out.service = { | |
deploy.resources.reservations.devices = [ | |
{ | |
driver = "nvidia"; | |
count = 1; | |
capabilities = [ "gpu" ]; | |
} | |
]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment