Docker 19.03 `--gpus` flag deprecates `runtime=nvidia`
Release notes
Specialized compute workloads like those used in Machine Learning can greatly benefit from access to GPUs. GitLab Runner now supports forwarding the --gpu
flag, available in Docker 19.03. This allows developers to configure GitLab Runner to leverage GPUs.
Description
In the latest docker release, 19.03
, a new flag is added for docker run
, --gpus
, which allows to specify GPU resources to be passed through to the image (so far only Nvidia GPUs, afaik). The latest nvidia-docker
has already adopted this feature (see github), but deprecated --runtime=nvidia
.
Proposal
Add support for the gpus flag in config.toml
Links to related issues and merge requests / references
Practically the same issue, but in docker compose: DockSTARTer:781 Compose:6239 Compose:6691
PS: Kiendang's workaround, in Compose:6691 does not work for me:
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/2cf97eecf653cd2a9bfcabefe60e73cfbf7533116d8f2507d624d7b4870ead17/log.json: no such file or directory): /usr/bin/nvidia-container-toolkit did not terminate sucessfully: flag provided but not defined: -root