Skip to content

Instantly share code, notes, and snippets.

@tchayintr
Created March 27, 2025 01:28
Show Gist options
  • Select an option

  • Save tchayintr/311d3adc90c8fb4e753b4fd154f24a27 to your computer and use it in GitHub Desktop.

Select an option

Save tchayintr/311d3adc90c8fb4e753b4fd154f24a27 to your computer and use it in GitHub Desktop.
Fix Failed to initialize NVML: Unknown Error in ollama Docker container
# https://github.com/ollama/ollama/issues/4604
# Add `"exec-opts": ["native.cgroupdriver=cgroupfs"]` to `/etc/docker/daemon.json`
```
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
},
"exec-opts": ["native.cgroupdriver=cgroupfs"]
}
```
# https://github.com/ollama/ollama/issues/6840
# Uncomment #no-cgroups = false in /etc/nvidia-container-runtime/config.toml
sudo systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment