supervisely-ecosystem / mmdetection_3d

Apache License 2.0
1 stars 1 forks source link

Docker agents cannot start with --runtime=nvidia (deprecated) #6

Open lreiher opened 2 years ago

lreiher commented 2 years ago

I know that this problem is not only related to this repository, however, I did not find a more suitable place in your GitHub to post this issue.

I was trying to deploy this app for 3D object detection on my custom Supervisely agent running on my own machine. Obviously the Docker containers need GPU support to run this.

As far as I am aware, the --runtime=nvidia flag to docker run is officially deprected (e.g., see here). Instead, one can simply pass --gpus all. Passing --runtime=nvidia throws an error on my system, even though I'm able to run GPU-enabled Docker containers.

So the first issue I ran into was setting up the Supervisely agent. I managed to get the agent running by changing --runtime=nvidia to --gpus all in the bash script that I downloaded for setting up the agent. In the Supervisely web interface the nvidia-smi status was shown successfully.

Deploying this application though gave me another error: I'm assuming that the agent tried to launch another container with --runtime=nvidia, which is not available, s.t. the container is launched without GPU support and not able to run the neural network.


TLDR: You should replace --runtime=nvidia by the --gpus flag for GPU-enabled Docker agents.

teamplayer3 commented 1 year ago

Have the same problem. At serving, I got the following warning:

Available docker runtimes runtimes={"io.containerd.runc.v2":{"path":"runc"},"io.containerd.runtime.v1.linux":{"path":"runc"},"runc":{"path":"runc"}}
WARN: App requires GPU, but runtime nvidia not found in docker info, GPU features will be unavailable. Please, check nvidia drivers or contact tech support

Think the check must be updated. I run the local agent with --gpus all.

Update: Ok, think this is more a problem with supervisely agent. If I run the docker container with --gpus all --privileged it works.