Skip to content

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

@maxfrei750

Description

@maxfrei750

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"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions