Skip to content

Modify the Linux docker run command for systems with 2+ GPUs #334

@mrezavand

Description

@mrezavand

The docker run command line for Linux in https://github.com/openvinotoolkit/docker_ci/blob/master/docs/accelerators.md>, docker run -it --device /dev/dri --group-add=$(stat -c \"%g\" /dev/dri/render* ) $IMAGE ./samples/cpp/samples_bin/hello_query_device, leads to docker: invalid reference format error.

The reason being stat -c \"%g\" /dev/dri/render* prints more than 1 line of output and the second line of IDs is interpreted as a docker image name.

I suggest the following modification for --group-add to generalize the command line for such cases:

--group-add=$(for g in $(stat -c "%g" /dev/dri/render* | sort -u); do echo $g; done).

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