Giter Club home page Giter Club logo

Comments (6)

3XX0 avatar 3XX0 commented on August 10, 2024

The API is fairly simple and should already be Cgo friendly: https://github.com/NVIDIA/libnvidia-container/blob/master/src/nvc.h

I would prefer not to provide official bindings unless we feel that they are really required, as there are potentially many drawbacks (opinionated implementation, additional maintenance, ABI stability...)

from libnvidia-container.

crosbymichael avatar crosbymichael commented on August 10, 2024

How would those drawbacks be fixed with unofficial bindings or be any different from using this as a C lib?

from libnvidia-container.

3XX0 avatar 3XX0 commented on August 10, 2024

Well for example, most Go runtimes already have a dedicated process in place to work around the multithreading-setns issue, so they could just reuse it instead having us hack it in the bindings.

And as I said, maintaining bindings with yet another ABI is a lot of work when (arguably) only one runtime would use it.

from libnvidia-container.

vishh avatar vishh commented on August 10, 2024

@3XX0 I can see go bindings being useful for k8s device plugins too where as @crosbymichael mentioned we can perform all static checks (potentially) at the device plugin level.
cc @jiayingz

from libnvidia-container.

crosbymichael avatar crosbymichael commented on August 10, 2024

Like you said the Go threading issues are a problem and I don't think we need to support that.

Some of the functionality with this lib is determining the lib paths, versions, device paths and what devices that need to go into a container. This stuff should be split out so that we can depend on it and make decisions before invoking the runtime. Smaller surface area could help more.

from libnvidia-container.

3XX0 avatar 3XX0 commented on August 10, 2024

What do you mean by checks and validation exactly, are you referring to the environment variables NVIDIA_REQUIRE_*?

As for the API, the calls for GPU information and injection are already split: nvc_*_info vs nvc_*_mount.

from libnvidia-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.