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

nvidia-docker does not work with complex commands #26

Closed
elezar opened this issue Jan 5, 2016 · 1 comment
Closed

nvidia-docker does not work with complex commands #26

elezar opened this issue Jan 5, 2016 · 1 comment
Labels

Comments

@elezar
Copy link
Member

elezar commented Jan 5, 2016

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.

@flx42
Copy link
Member

flx42 commented Jan 7, 2016

Thank you for reporting this issue, this should be fixed in the upcoming overhaul of nvidia-docker (which you can already peek on the v1 branch).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants