Skip to content

Nvidia-docker2 #23

Closed
Closed

Description

@cyberwillis

any way to use it with nvidia-docker2 alpha ?

Activity

  1. cyberwillis commented on Nov 8, 2017

    @cyberwillis
    Author

    My problem was solved!

  2. eywalker commented on Nov 8, 2017

    @eywalker
    Owner

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

  3. cyberwillis commented on Nov 8, 2017

    @cyberwillis
    Author

    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

  4. cyberwillis commented on Nov 8, 2017

    @cyberwillis
    Author

    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.

  5. eywalker commented on Nov 16, 2017

    @eywalker
    Owner

    @cyberwillis thanks a lot for sharing this!

  6. anibali commented on Jan 16, 2018

    @anibali

    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.

  7. Xin-cqu commented on Mar 12, 2019

    @Xin-cqu

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions