Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating and Configuring /etc/docker/daemon.json to Resolve GPU Unavailability in Docker Container #386

Closed
Shin-ichi-Takayama opened this issue Feb 29, 2024 · 4 comments

Comments

@Shin-ichi-Takayama
Copy link

GPU was available in the running Docker container, but after a while it became unavailable.
Running the nvidia-smi command showed Failed to initialize NVML: Unknown Error.
I found the following solution.
NVIDIA/nvidia-docker#1671 (comment)

However, there was no /etc/docker/daemon.json file.
Can I create the /etc/docker/daemon.json file and what should I write in it to fix the problem?

Best regards.

@elezar
Copy link
Member

elezar commented Feb 29, 2024

The solution you linked does not mention the /etc/docker/daemon.json. Have you performed the other steps discussed in the issue?

@Shin-ichi-Takayama
Copy link
Author

The link states that.

2.Explicitly disabling systemd cgroup management in Docker:.
Set the parameter
"exec-opts": ["native.cgroupdriver=cgroupfs"] in the /etc/docker/daemon.json file and restart docker.

No, I have not tried any other method.
Method No. 2 in the link is the easiest to implement.

@elezar
Copy link
Member

elezar commented Feb 29, 2024

Ah ... sorry. Missed that. How is docker configured on your system? It should be fine to create the file at /etc/docker/daemon.json with the contents:

{
    "exec-opts": ["native.cgroupdriver=cgroupfs"]
}

then.

@Shin-ichi-Takayama
Copy link
Author

Thank you for your response. I will try that method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants