Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia-docker2 #23

Closed
cyberwillis opened this issue Nov 8, 2017 · 7 comments
Closed

Nvidia-docker2 #23

cyberwillis opened this issue Nov 8, 2017 · 7 comments

Comments

@cyberwillis
Copy link

any way to use it with nvidia-docker2 alpha ?

@cyberwillis
Copy link
Author

My problem was solved!

@eywalker
Copy link
Owner

eywalker commented Nov 8, 2017

Hi @cyberwillis, if you figured out a good way to integrate it, would you mind sharing? I'm curious how you resolved this question.

@cyberwillis
Copy link
Author

cyberwillis commented Nov 8, 2017

Hi again...
Sorry the delay in get back to you.
At first my problem was that I had a composer file that wasn't building or running by nvidia-docker-compose, but the problem is not nvidia-docker-composer at all, because the nvidia-docker now has changed the way it works with introduction of nvidia-docker 2 alpha.
Now it needs to pass to the docker daemon the argument --runtime=nvidia that tell the daemon to run the specific runtime for NVidia and by this way even docker-compose wasn't able to do things. At least I don't know a way to send runtime arguments to dockerd by docker-compose.

So investigating a little here, I found that the specific runtime can be set in /etc/docker/daemon.json

{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": [ ]
        }
    }
}

by using this the docker-compose started to work again, because eliminates the necessity of pass this argument all the time. Probably nvidia-docker-compose will also work now ... I don't get a time to test. I do have a big chain of images to build and run to be sure about this solution.
But apparently its working... I will see at the end.

Also to complement nvidia-docker-plugin does not exist anymore.

[UPDATE] : fixed the syntax of daemon.json

@cyberwillis
Copy link
Author

cyberwillis commented Nov 8, 2017

Yes I confirm, my problem is solved and I get back on track and docker-compose alone is doing everything now. I am not using nvidia-docker-compose because probably it's trying to do something else involving nvidia-docker-plugin that is not needed anymore.

@eywalker
Copy link
Owner

@cyberwillis thanks a lot for sharing this!

@anibali
Copy link

anibali commented Jan 16, 2018

It looks like docker-compose will be gaining a "runtime" option for the 2.3 schema next release, which will enable an alternative to setting default-runtime in daemon.json. See docker/compose#5405.

@Xin-cqu
Copy link

Xin-cqu commented Mar 12, 2019

Hi again...
Sorry the delay in get back to you.
At first my problem was that I had a composer file that wasn't building or running by nvidia-docker-compose, but the problem is not nvidia-docker-composer at all, because the nvidia-docker now has changed the way it works with introduction of nvidia-docker 2 alpha.
Now it needs to pass to the docker daemon the argument --runtime=nvidia that tell the daemon to run the specific runtime for NVidia and by this way even docker-compose wasn't able to do things. At least I don't know a way to send runtime arguments to dockerd by docker-compose.

So investigating a little here, I found that the specific runtime can be set in /etc/docker/daemon.json

{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": [ ]
}
}
}

by using this the docker-compose started to work again, because eliminates the necessity of pass this argument all the time. Probably nvidia-docker-compose will also work now ... I don't get a time to test. I do have a big chain of images to build and run to be sure about this solution.
But apparently its working... I will see at the end.

Also to complement nvidia-docker-plugin does not exist anymore.

[UPDATE] : fixed the syntax of daemon.json

That works well for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants