Reputation: 337
Im starting some python scripts on a DGX Server running a Nvidia Tensorflow docker. I've managed once to re enter the docker file, where I could see that the process was still running. However I couldn't see the new prints in the console anymore.
Is there a way I can run the docker e.g. a whole night and when I re enter it I can see my complete printed logs in the bash console?
Upvotes: 0
Views: 84
Reputation: 337
$ docker attach [CONTAINER ID]
did the job to re-enter my console over ssh. However as Clayton Harbich pointed out
$ docker logs [OPTIONS] CONTAINER ID
is what I needed without knowing. Re-entering the console with attach doesn't show the history of console entries. So with those two commands I was able to see what happened and can further observe the scripts process.
Upvotes: 0
Reputation: 513
I think you are wanting logging. I have only done application logging but maybe this will help: https://docs.docker.com/engine/reference/commandline/logs/
$ docker logs [OPTIONS] CONTAINER
edit: Additional links:
log.rowanto.com/docker-console-logs-problem
docs.docker.com/config/containers/logging
Upvotes: 2