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

Docker Error - Unknown or Invalid Runtime Name: Nvidia #150

Open
10 tasks
YuminosukeSato opened this issue Nov 16, 2023 · 3 comments
Open
10 tasks

Docker Error - Unknown or Invalid Runtime Name: Nvidia #150

YuminosukeSato opened this issue Nov 16, 2023 · 3 comments

Comments

@YuminosukeSato
Copy link

YuminosukeSato commented Nov 16, 2023

1. Issue or feature description

I'm experiencing a runtime error with Docker when using the Nvidia runtime. Despite having a successful initial Docker command and editing the Docker configuration, I encounter an error when executing a script.

2. Steps to reproduce the issue

  1. Initial Docker Command:

    sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

    This command executes successfully.

  2. Edit Docker Configuration:
    Edited /etc/docker/daemon.json to set Nvidia as the default runtime:

    {
        "runtimes": {
            "nvidia": {
                "path": "nvidia-container-runtime",
                "runtimeArgs": []
            }
        },
        "default-runtime": "nvidia"
    }
  3. Execute Script with Modified Settings:
    Running the script scripts/run_dev.sh ~/workspaces/isaac_ros-dev/ results in an error:

    docker: Error response from daemon: unknown or invalid runtime name: nvidia.
    

3. Information to attach (optional if deemed irrelevant)

  • Output of nvidia-container-cli -k -d /dev/tty info
  • Kernel version from uname -a
  • Relevant kernel output lines from dmesg
  • Driver information from nvidia-smi -a
  • Docker version from docker version 24.0.7, build afdd53b
  • NVIDIA packages version from dpkg -l '*nvidia*' or rpm -qa '*nvidia*'
  • NVIDIA container library version from nvidia-container-cli -V
  • NVIDIA container library logs (see troubleshooting)
  • Docker command, image and tag used
  • Additional information:
    • Operating System: Ubuntu 22.04
    • Output of sudo docker info | grep -i runtime shows Runtimes: runc io.containerd.runc.v2 nvidia and Default Runtime: nvidia
    • Confirmation of successful installation of the NVIDIA Container Toolkit
@YuminosukeSato YuminosukeSato changed the title ocker Error - Unknown or Invalid Runtime Name: Nvidia Docker Error - Unknown or Invalid Runtime Name: Nvidia Nov 16, 2023
@elezar elezar transferred this issue from NVIDIA/nvidia-docker Nov 16, 2023
@elezar
Copy link
Member

elezar commented Nov 16, 2023

Just to make sure that this has been done, have you restarted the docker daemon after making the configuration changes:

sudo systemctl restart docker

(I would expect so since the runtime shows up in the docker info output).

@EmmanuelMr18
Copy link

EmmanuelMr18 commented Jan 25, 2024

Are you using Ubuntu with WSL?
If so, I found that you need to specify the runtimes in the configuration file of your docker desktop on windows.
This looks that fixed my problem, now running my image with docker is working.

https://stackoverflow.com/questions/77323535/add-nvidia-runtime-to-docker-runtimes-on-windows-wsl
image

@wirytiox
Copy link

wirytiox commented Jul 17, 2024

for anyone who wanted to copy paste it:

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "runtimes": {
    "nvidia": {
      "path": "/usr/bin/nvidia-container-runtime",
      "runtimeArgs": []
    }
  }
}

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

4 participants