Skip to content

Instantly share code, notes, and snippets.

@adujardin
Last active September 12, 2024 17:30
Show Gist options
  • Save adujardin/1c9007abde7c466ba372ca6448b25c8c to your computer and use it in GitHub Desktop.
Save adujardin/1c9007abde7c466ba372ca6448b25c8c to your computer and use it in GitHub Desktop.
Gitlab Runner NVIDIA Config
# This gitlab runner config provide full gpu support for a docker runner (including hw decoding etc)
# Requires gitlab runner >= 13.9 for 'gpus=all', can be 'runtime = "nvidia"' alternatively for older versions (not tested with NVIDIA_DRIVER_CAPABILITIES)
# Some other options may not be required such as 'privileged' but I needed it (for USB device access)
concurrent = 1
check_interval = 0
[[runners]]
name = "my_nvidia_runner"
url = <gitlab_url>
token = <Token>
executor = "docker"
environment = ["DOCKER_TLS_CERTDIR=", "NVIDIA_DRIVER_CAPABILITIES=all"]
[runners.docker]
privileged = true
tls_verify = false
image = "docker:stable"
disable_cache = false
volumes = ["/cache", "/dev:/dev"] # /dev mounting is for USB device passthrough (with hotplug support)
shm_size = 0
pull_policy = "if-not-present"
gpus= "all"
[runners.cache]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment