nvidia-docker icon indicating copy to clipboard operation
nvidia-docker copied to clipboard

Feature request: use GPU if available, else start container without one

Open maxfrei750 opened this issue 3 years ago • 0 comments

I'm using docker compose to run a container:

version: "3.9"
services:
  app:
    image: nvidia/cuda:11.0.3-base-ubuntu20.04
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [ gpu ]

The container can benefit from the presence of a GPU, but it does not strictly need one. Using the above docker-compose.yaml results in an error

Error response from daemon: could not select device driver "" with capabilities: [[gpu]]

when being used on a machine without a GPU. Is it possible to specify "use a GPU, if one is available, else start the container without one"?

maxfrei750 avatar Jul 27 '22 06:07 maxfrei750