Skip to content

Add GPU support for Docker executor

Recently Docker 19.03.5 was added to the CI, !1874 (merged), therefore this MR, originally written half a year ago, may work now.

What does this MR do?

In relation to issue #4585 (closed), this merge request is an attempt at forwarding the --gpu flag available in Docker 19.03, rather than relying on the cuda-container-runtime workaround.

At the moment the gpu flag only only supports Nvidia GPUs, but there is some ongoing discussion about supporting other architectures in the future.

An example of the syntax for arguments to the --gpu is available in the docker-cli documentation

Why was this MR needed?

To be able to use nvidia-docker containers on systems with nvidia-docker 2 or newer, without doing any workaround hacks like mentioned above.

Are there points in the code the reviewer needs to double check?

I have almost no experience in Go, so I'm really not sure if this will work - maybe just take this as more of a suggestion.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

#4585 (closed)

Edited by Steve Xuereb

Merge request reports