From caf21526a0d9d91620a81f76337d8868816e5d68 Mon Sep 17 00:00:00 2001 From: Bret Fisher Date: Sun, 14 Jan 2018 01:08:23 -0500 Subject: [PATCH 1/3] docs: add info for events backlog and scope 1. Adds `docker events` description info on the two scope types of events. 2. Adds `docker events` note in two places about backlog limit of event log. Further info and background info in Issue 727 Signed-off-by: Bret Fisher Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 988b9a0d9646137e1582e5def62f6b7754498a19) Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/events.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/events.md b/docs/reference/commandline/events.md index 5c450aa0a9de..eea1218c3a15 100644 --- a/docs/reference/commandline/events.md +++ b/docs/reference/commandline/events.md @@ -31,7 +31,12 @@ Options: ## Description Use `docker events` to get real-time events from the server. These events differ -per Docker object type. +per Docker object type. Different event types have different scopes. Local +scoped events are only seen on the node they take place on, and swarm scoped +events are seen on all managers. + +Only the last 1000 log events are returned. You can use filters to further limit +the number of events returned. ### Object types @@ -160,6 +165,9 @@ that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (aka Unix epoch or Unix time), and the optional .nanoseconds field is a fraction of a second no more than nine digits long. +Only the last 1000 log events are returned. You can use filters to further limit +the number of events returned. + #### Filtering The filtering flag (`-f` or `--filter`) format is of "key=value". If you would From 41718b98f679cd14b034f4d62ae8f01b68b13c63 Mon Sep 17 00:00:00 2001 From: Adrian Plata Date: Fri, 21 Jun 2019 15:40:02 -0700 Subject: [PATCH 2/3] adding nvidia gpu access info Signed-off-by: Adrian Plata Removing prerequisites section. Signed-off-by: Adrian Plata Removing prerequisites section. Signed-off-by: Adrian Plata adding nvidia gpu access info Signed-off-by: Adrian Plata Refining information. Removing prerequisites section. adding nvidia gpu access info Signed-off-by: Adrian Plata Refining information. Removing prerequisites section. adding nvidia gpu access info Signed-off-by: Adrian Plata Refining information. Removing prerequisites section. (cherry picked from commit f7b75eeb9bddf8ef46655e11e13657da0bb87a6a) Signed-off-by: Sebastiaan van Stijn --- docs/reference/commandline/run.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 6e4f29abea7d..9cc6e0619812 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -605,6 +605,33 @@ PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.micro > Windows containers. This option fails if the container isolation is `hyperv` > or when running Linux Containers on Windows (LCOW). +### Access an NVIDIA GPU + +The `--gpus­` flag allows you to access NVIDIA GPU resources. First you need to +install [nvidia-container-runtime](https://nvidia.github.io/nvidia-container-runtime/). +Visit [Specify a container's resources](https://docs.docker.com/config/containers/resource_constraints/) +for more information. + +To use `--gpus`, specify which GPUs (or all) to use. If no value is provied, all +available GPUs are used. The example below exposes all available GPUs. + +```bash +$ docker run -it --rm --gpus all ubuntu nvidia-smi +``` + +Use the `device` option to specify GPUs. The example below exposes a specific +GPU. + +```bash +$ docker run -it --rm --gpus device=GPU-3a23c669-1f69-c64e-cf85-44e9b07e7a2a ubuntu nvidia-smi +``` + +The example below exposes the first and third GPUs. + +```bash +$ docker run -it --rm --gpus device=0,2 nvidia-smi +``` + ### Restart policies (--restart) Use Docker's `--restart` to specify a container's *restart policy*. A restart From 10a899b6bdb75e395711026985af6fd3d4a96908 Mon Sep 17 00:00:00 2001 From: Rohan Verma Date: Fri, 14 Jun 2019 13:20:14 +0530 Subject: [PATCH 3/3] fix: docker login autocomplete for zsh Changed `--user` to `--username` Signed-off-by: Rohan Verma (cherry picked from commit 1dc756e8dfcba59fb901092651f4e68210bdb580) Signed-off-by: Sebastiaan van Stijn --- contrib/completion/zsh/_docker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 04254d1cf58b..512bfbc83f63 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -9,6 +9,7 @@ # - Felix Riedel # - Steve Durrheimer # - Vincent Bernat +# - Rohan Verma # # license: # @@ -2784,7 +2785,7 @@ __docker_subcommand() { $opts_help \ "($help -p --password)"{-p=,--password=}"[Password]:password: " \ "($help)--password-stdin[Read password from stdin]" \ - "($help -u --user)"{-u=,--user=}"[Username]:username: " \ + "($help -u --username)"{-u=,--username=}"[Username]:username: " \ "($help -)1:server: " && ret=0 ;; (logout)