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

nvidia-docker run emits pull status to stdout #310

Closed
hholst80 opened this issue Feb 8, 2017 · 3 comments
Closed

nvidia-docker run emits pull status to stdout #310

hholst80 opened this issue Feb 8, 2017 · 3 comments
Labels

Comments

@hholst80
Copy link

hholst80 commented Feb 8, 2017

Expected results (as docker cli does)

hholst@fb-hholst3 ~ 
$ CID=$(docker run -dit alpine:latest sh)
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
0a8490d0dfd3: Pulling fs layer
0a8490d0dfd3: Verifying Checksum
0a8490d0dfd3: Download complete
0a8490d0dfd3: Pull complete
Digest: sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
Status: Downloaded newer image for alpine:latest

hholst@fb-hholst3 ~ 
$ echo $CID
585df99e599e6024de6eb3ea0b449640b4704d9c049e62762281002fb06c396c

Nvidia docker result:

hholst@fb-hholst3 ~ 
$ CID=$(nvidia-docker run -dit alpine:latest sh)

hholst@fb-hholst3 ~ 
$ echo $CID
latest: Pulling from library/alpine 0a8490d0dfd3: Pulling fs layer 0a8490d0dfd3: Verifying Checksum 0a8490d0dfd3: Download complete 0a8490d0dfd3: Pull complete Digest: sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8 Status: Downloaded newer image for alpine:latest 60649d2e04a5ed5ca5d80e286bd8ee6c701ef817f97ccc60cc0611729261e334

Notes

Please note that you need to remove the image before running the command with docker rmi alpine:latest.

@hholst80
Copy link
Author

hholst80 commented Feb 8, 2017

Temporary workaround for anyone running into this problem:

CID=$(nvdia-docker run ... | tail -n1)

The workaround also works with docker cli.

@flx42
Copy link
Member

flx42 commented Feb 8, 2017

Good catch!
Should be an easy fix.

cmd.Stdout = os.Stdout

-               cmd.Stdout = os.Stdout
+               cmd.Stdout = os.Stderr

We will fix that in 1.0.1, thanks for providing a workaround!

@flx42 flx42 added the bug label Feb 8, 2017
@hholst80
Copy link
Author

hholst80 commented Feb 8, 2017

No problem! Just make sure that the container ID is still emitted to stdout. ;-)

@flx42 flx42 closed this as completed in 25a18f5 Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants