Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

nvidia-docker does not work with complex commands #26

@elezar

Description

@elezar

When running the following command:

docker run --rm -ti nvidia/cuda:7.5-cudnn4-devel /bin/bash -ci 'groupadd -f -g 1000 dummy && useradd -u 1000 -g dummy dummy && mkdir --parent /home/dummy && chown -R dummy:dummy /home/dummy && sudo -u dummy HOME=/home/dummy bash'

The container starts as expected, and the prompt is shown as:

`````` dummy@e7ffa1ea404f:/$```

When I use the nvidia-docker wrapper, however:


GPU=0 nvidia-docker run --rm -ti nvidia/cuda:7.5-cudnn4-devel /bin/bash -ci 'groupadd -f -g 1000 dummy && useradd -u 1000 -g dummy dummy && mkdir --parent /home/dummy && chown -R dummy:dummy /home/dummy && sudo -u dummy HOME=/home/dummy bash'

```
the following output is shown:
```

[ NVIDIA ] =INFO= Driver version: 352.63
[ NVIDIA ] =INFO= CUDA image version: 7.5

Usage: groupadd [options] GROUP

Options:
  -f, --force                   exit successfully if the group already exists,
                                and cancel -g if the GID is already used
  -g, --gid GID                 use GID for the new group
  -h, --help                    display this help message and exit
  -K, --key KEY=VALUE           override /etc/login.defs defaults
  -o, --non-unique              allow to create groups with duplicate
                                (non-unique) GID
  -p, --password PASSWORD       use this encrypted password for the new group
  -r, --system                  create a system account
  -R, --root CHROOT_DIR         directory to chroot into

and the container is not started.

Changing the last line of the nvidia-docker wrapper to:
$DOCKER $DOCKER_ARGS $NV_DOCKER_ARGS "$@"
seems to address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions