Skip to content

nvidia-docker v2? #1

Open
Open

Description

@thomas-riccardi

Hi,
Are there plans to use nvidia-docker v2 (now merged into master: new official version) ?

It is simpler to use: https://github.com/NVIDIA/nvidia-docker/wiki/About-version-2.0

Activity

  1. rporres commented on Nov 24, 2017

    @rporres

    Above links are broken. I guess it's because 2.0 branch was merged into master recently by means of NVIDIA/nvidia-docker@fe18749

  2. thomas-riccardi commented on Nov 24, 2017

    @thomas-riccardi
    Author

    @rporres indeed, I updated my comment.

  3. mcuadros commented on Dec 22, 2017

    @mcuadros
    Contributor

    Its requires any changes? The current version was done for bare docker, not even nvidia-docker 1.0

  4. thomas-riccardi commented on Dec 22, 2017

    @thomas-riccardi
    Author

    using nvidia-docker v2 would simplify the docker run part: no need to add:

    --volumes-from nvidia-driver \
        --env PATH=$PATH:/opt/nvidia/bin/ \
        --env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nvidia/lib \
        $(for d in /dev/nvidia*; do echo -n "--device $d "; done) \
    

    So what change is required is in fact installing nvidia-docker v2 in coreos, and removing the nvidia-driver container.

  5. trevex commented on Jan 29, 2018

    @trevex
    Contributor

    I used the following steps to install nvidia-docker v2 (very hacky though):

    1. install nvidia driver
    2. instead of the volume I simply copy the files to the host, e.g.
    /usr/bin/docker run --rm --volume /opt/nvidia/current:/output srcd/coreos-nvidia:${VERSION} cp -a /opt/nvidia/. /output/
    
    1. install libnvidia-container
    2. (build and) install nvidia-container-runtime
    3. create small bash scripts in /run/torcx/bin for nvidia-container{-runtime,-runtime-hook,-cli} to make sure they are accessible by docker and libraries are in LD_LIBRARY_PATH
    4. create /etc/docker/daemon.json and set default runtime to nvidia
    5. restart docker
    6. add the nvidia-docker bash scripts

    There is only one issue currently: The nvidia-container-runtime somehow (even though same commit as installed runc) has a regression. And fails to run containers with docker run --security-opt=no-new-privileges (coreos/bugs#1796).

  6. lsjostro commented on Feb 2, 2018

    @lsjostro

    We have it working as well (nvidia-docker v2 + coreos + k8s device plugin). We will try to clean it up and hopefully be able to share it soonish.

  7. lsjostro commented on Feb 9, 2018

    @lsjostro
  8. thomas-riccardi commented on Feb 9, 2018

    @thomas-riccardi
    Author

    @lsjostro I would be interested in having your previous "nvidia-docker v2 + coreos" version, even if not cleaned up and production-ready: nvidia-docker v2 enables sharing GPUs between containers (at the cost of losing k8s scheduling) that device drivers solutions don't support (and won't for the foreseeable future).

    In any case, GoogleCloudPlatform/container-engine-accelerators#54 is useful too, thanks for that !

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