dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

How to use runtime=nvidia in dobi? #166

Closed sih4sing5hong5 closed 4 years ago

sih4sing5hong5 commented 5 years ago

There two ways for using nvidia-docker, setting runtime or using another command nvidia-docker.

  1. docker run --runtime=nvidia [image] ...
  2. nvidia-docker run [image] ...

Which one is more compatiable with dobi?

sih4sing5hong5 commented 5 years ago

The host config of Runtime is at fsouza/go-dockerclient. The host settings of dobi are at tasks/job/run.go.

sih4sing5hong5 commented 5 years ago

I know I should insert Runtime : t.config.Runtime into run.go.

But how to keep runtime as default if user doesn't set this runtime variable?

dnephin commented 5 years ago

I guess there is no way to set that as a default for all jobs right now.

sih4sing5hong5 commented 4 years ago

This problem is solved after docker 19.03. Because the docker runtime supports the nvidia GPU.

Thank you for this great work!